orgin of semicolon usage

Discussion in 'C Programming' started by Russ, Oct 24, 2003.

  1. Russ

    Russ Guest

    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.
     
    Russ, Oct 24, 2003
    #1
    1. Advertising

  2. Russ

    Artie Gold Guest

    [OT] Re: orgin of semicolon usage

    osmium wrote:
    > Russ writes:
    >
    >
    >>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.
    >


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

    --ag

    --
    Artie Gold -- Austin, Texas
    Oh, for the good old days of regular old SPAM.
     
    Artie Gold, Oct 24, 2003
    #2
    1. Advertising

  3. In article <bn9rps$ub9o9$-berlin.de> "osmium" <> writes:
    > Russ writes:
    >
    > > 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.


    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.
    --
    dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
    home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
     
    Dik T. Winter, Oct 24, 2003
    #3
  4. Russ

    osmium Guest

    Russ writes:

    > 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.
     
    osmium, Oct 24, 2003
    #4
  5. "Dik T. Winter" <> wrote in message
    news:...
    > In article <bn9rps$ub9o9$-berlin.de> "osmium"

    <> writes:
    > > Russ writes:
    > >
    > > > 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.

    >
    > 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
     
    Glen Herrmannsfeldt, Oct 24, 2003
    #5
  6. Russ

    Derk Gwen Guest

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

    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    Wow. A sailboat.
     
    Derk Gwen, Oct 25, 2003
    #6
  7. Russ

    Tauno Voipio Guest

    "Derk Gwen" <> wrote in message
    news:...
    > (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
     
    Tauno Voipio, Oct 25, 2003
    #7
  8. 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.


    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

    ^^^^^^^^^^^^^^^^^^
    http://galileo.phys.virginia.edu/~jvn/

    "Science knows only one commandment: contribute to science."
    -- Bertolt Brecht, "Galileo".
     
    Julian V. Noble, Oct 25, 2003
    #8
  9. In article <nYrmb.92$> "Tauno Voipio" <> writes:
    > "Derk Gwen" <> wrote in message
    > news:...
    > > (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.


    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.
    --
    dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
    home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
     
    Dik T. Winter, Oct 25, 2003
    #9
  10. Russ

    Derk Gwen Guest

    "Dik T. Winter" <> wrote:
    # In article <nYrmb.92$> "Tauno Voipio" <> writes:
    # > "Derk Gwen" <> wrote in message
    # > news:...
    # > > (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.)

    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    Death is the worry of the living. The dead, like myself,
    only worry about decay and necrophiliacs.
     
    Derk Gwen, Oct 26, 2003
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan
    Replies:
    3
    Views:
    4,606
  2. ankursinha
    Replies:
    33
    Views:
    22,351
    Keith Thompson
    Feb 25, 2004
  3. Prashanth Badabagni

    Printing "hello , wolrd" with out using semicolon

    Prashanth Badabagni, May 3, 2004, in forum: C Programming
    Replies:
    42
    Views:
    2,123
    Peter Nilsson
    May 12, 2004
  4. subnet

    Programs without semicolon

    subnet, May 11, 2004, in forum: C Programming
    Replies:
    18
    Views:
    2,953
    avsharath
    Jun 1, 2007
  5. Peter Michaux

    Cookies: semicolon vs. semicolon-space

    Peter Michaux, Dec 10, 2006, in forum: Javascript
    Replies:
    3
    Views:
    222
    Michael Winter
    Dec 11, 2006
Loading...

Share This Page