orgin of semicolon usage

R

Russ

Here is a question for the programming language historians out there.
Can anyone tell me which "major" language first introduced the
convention of terminating each statement with a semicolon? Was it C by
any chance? Thanks.
 
A

Artie Gold

osmium said:
Russ writes:




It goes back to Algol 60 at least.

To be pedantic, in Algol 60, the semicolon is a statement
*separator* as opposed to a statement *terminator*.

--ag
 
D

Dik T. Winter

> Russ writes:
>
>
> It goes back to Algol 60 at least.

No, in Algol 60 it was a statement separator (*). Something slightly
different. But indeed, the first use was in Algol 60. (Other
languages of that time where much more line-oriented.) The use of
the semicolon as terminator would come from C or one of its predecessors
(B, BCPL, ...).
-
(*) In Algol 60: "begin" a := b; b := c "end"
is valid, in C the equivalent { a = b; b = c }
is invalid.
 
O

osmium

Russ said:
Here is a question for the programming language historians out there.
Can anyone tell me which "major" language first introduced the
convention of terminating each statement with a semicolon? Was it C by
any chance? Thanks.

It goes back to Algol 60 at least.
 
G

Glen Herrmannsfeldt

Dik T. Winter said:
No, in Algol 60 it was a statement separator (*). Something slightly
different. But indeed, the first use was in Algol 60. (Other
languages of that time where much more line-oriented.) The use of
the semicolon as terminator would come from C or one of its predecessors
(B, BCPL, ...).

It is a statement terminator in PL/I, from about 1966 or so. I don't know
anything between Algol and PL/I that it could have been.

IF A=B THEN PUT LIST('equal');
ELSE PUT LIST('not equal');

-- glen
 
D

Derk Gwen

(e-mail address removed) (Russ) wrote:
# Here is a question for the programming language historians out there.
# Can anyone tell me which "major" language first introduced the
# convention of terminating each statement with a semicolon? Was it C by
# any chance? Thanks.

Change '{' to 'BEGIN', '}' to 'END', ';' to '$', and you've recreated
Jovial syntax. As the original definition of structs where field names
where unqualified by the struct name was also taken from Jovial TABLEs.
 
T

Tauno Voipio

Derk Gwen said:
(e-mail address removed) (Russ) wrote:
# Here is a question for the programming language historians out there.
# Can anyone tell me which "major" language first introduced the
# convention of terminating each statement with a semicolon? Was it C by
# any chance? Thanks.

Change '{' to 'BEGIN', '}' to 'END', ';' to '$', and you've recreated
Jovial syntax. As the original definition of structs where field names
where unqualified by the struct name was also taken from Jovial TABLEs.

JOVIAL (Jules' Own Version of International Algorithmic Language) is a
descendant of Algol, so Algol was probably the first to use semicolons
between the statements.

Tauno Voipio
tauno voipio @ iki fi
 
J

Julian V. Noble

Russ said:
Here is a question for the programming language historians out there.
Can anyone tell me which "major" language first introduced the
convention of terminating each statement with a semicolon? Was it C by
any chance? Thanks.

It has been a definition terminator in Forth for quite a while (late 60's
to 1970). But I doubt Forth originated it as a terminator. PL/I is slightly
older.

--
Julian V. Noble
Professor Emeritus of Physics
(e-mail address removed)
^^^^^^^^^^^^^^^^^^
http://galileo.phys.virginia.edu/~jvn/

"Science knows only one commandment: contribute to science."
-- Bertolt Brecht, "Galileo".
 
D

Dik T. Winter

>
> JOVIAL (Jules' Own Version of International Algorithmic Language) is a
> descendant of Algol, so Algol was probably the first to use semicolons
> between the statements.

The last statement is correct, but not everybody knows from which version
of Algol, Jovial is a descendent. It comes from Algol 58 that only
existed through a presentation by Backus at a UNESCO conference in Geneva
in 1958. The presentation complete with syntax diagrams, is in the conference
proceedings. But the diagrams where still in a predecessor of BNF. What is
commonly called Algol is either Algol 60 as defined in the report of 1960,
or the revised version as defined in the revised report of 1962. And of
course there is Algol 68, which uses a 2-level van Wijngaarden grammar.
 
D

Derk Gwen

# > # > > (e-mail address removed) (Russ) wrote:
# > > # Here is a question for the programming language historians out there.
# > > # Can anyone tell me which "major" language first introduced the
# > > # convention of terminating each statement with a semicolon? Was it C by
# > > # any chance? Thanks.
# > >
# > > Change '{' to 'BEGIN', '}' to 'END', ';' to '$', and you've recreated
# > > Jovial syntax. As the original definition of structs where field names
# > > where unqualified by the struct name was also taken from Jovial TABLEs.

# The last statement is correct, but not everybody knows from which version
# of Algol, Jovial is a descendent. It comes from Algol 58 that only

It's more than that. In Algols and Pascal, ';' is a separator so you have
if p then x else begin y; z end; w
In PL/I, it's a terminator so you have something like (if I remember PL/I)
if p then x; else do; y; z; end; w;
In Jovial, '$' is a statement terminator except for blocks which have no
terminator. This is what was used in C
if (p) x; else {y; z;} w;
Note the relation of ';' to 'else' and 'end' (or '}').

It makes sense for keypunching, but it's not necessary for keyboarding.
(Inserting and removing a statement on a punch cards from a deck, or
adding/deleting begins and ends does not require repunching existing cards
in Jovial.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top