× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Mark

Good information - I was coming from a couple Google hits about semicolon use.

Still, I think my point is fair, that a semicolon just isn't all that weird or crazy.

As I think about it, why did IBM decide to use the semicolon as a terminator? I take a shot at reverse-engineering, where I'm usually in murky waters!

Maybe it's related to the record-based structure of source members, and with parsing that, where a terminator makes it easier - other languages seem to use a CRLF or some such to delimit statements - there is no CRLF in source files - now I haven't put source into stream files yet, so can't say if those delimiters are there.

Enough frivolous speculation!!

Regards
Vern

On 7/19/2016 11:14 PM, Mark S Waterbury wrote:
Vern:

In Algol, Pascal and Ada, a semicolon is used as a statement separator, not a statement terminator. So you might have:

if a < b then begin
z := a;
end
else begin
z := b;
end;

(The final semicolon is only needed when this if-else statement is followed by another statement in a compound statement block.)

In PL/I, designed by IBM in the mid-1960s, the semicolon is a statement terminator, as currently used in free-form RPG IV. For example:

IF (A < B) THEN DO;
Z = A;
END;
ELSE DO;
Z = B;
END;

C was influenced by PL/I in many ways -- C statements end with a semicolon, except when braces are used, in which case, a ";" never follows the final "}" closing brace. For example:

if (a > b)
z = a;
else
z = b;

-or-

if (a > b) {
z = a;
}
else {
z = b;
}

HTH,

Mark S. Waterbury

> On 7/19/2016 4:56 PM, Vernon Hamberg wrote:
Crazy quirks? (See John's statement below) Semicolons?

Let's see, languages like C, Pascal, Algol, Ada, PL/I, et al, used semicolons to indicate the end of a line - and Javascript today can use them although optional, last I looked.

Not so crazy anytime, methinks!

Vern



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.