× 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.



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.