🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6034

Re: Algol-style semicolons

#6034
From: Stephen Perelgut
Date: Wed, 21 Dec 1988 16:14
42 lines
2268 bytes
> |perelgut@turing.toronto.edu (Stephen Perelgut) writes:
> | Another method of handling semi-colons is to not have them.  All you
> | need to do is terminate multi-part statements.  For example:
> | 
> | <Code fragment deleted>
> |
> 
> NEVIN LIBER  AT&T Bell Laboratories  nevin1@ihlpb.ATT.COM  (312) 979-4751
>  Yes, but what do you do with statements that span more than one line?
>  You still need a way of saying that an expression is to be continued on
>  the next line (or that you don't need to continue a statement by
>  use of a separator or terminator; this amounts to the same thing).

My example wasn't entirely clear on this point.  Careful definition of a
language will allow statements to unambiguously extend across any arbitrary
amounts of whitespace including blanks, tabs, form-feeds and newlines.  For
example, in the Turing programming language I might be acting dumb and write
a statement that looks like
	if x
    / 7 >
    12 then put "Hi there." else put
    "It's not quite right" end
    if

You might prefer to see this written as
	if x/7 > 12 then
	    put "Hi there."
	else
	    put "It's not quite right"
	end if

The Turing language definition (and the various interpreters and compilers)
would treat both exactly the same.  The paragraphing feature of the environment
supplied with the compilers would try to turn the first into a semblence of
the second.

One caveat, atomic elements cannot cross line boundaries so you can't split
a real number or a string literal across two lines.  But you can break up
statements at any other point, even expressions
	"This string contains the value" +
	" of 7 + 5 as a string literal: " + intstr ( 7
	+ 5)
Technical Details
Message-ID: <8812211614.AA10691@queen.csri.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!csri.toronto.edu!perelgut
References: <1126@etive.ed.ac.uk> <208100002@s.cs.uiuc.edu> <868@mcrware.UUCP> <8008@aw.sei.cmu.edu> <GARY.88Dec15142623@milo.mcs.clarkson.edu> <88Dec16.100919est.4327@turing.toronto.edu> <9235@ihlpb.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!csri.toronto.edu!perelgut
From: perelgut@csri.toronto.edu (Stephen Perelgut)
Newsgroups: comp.lang.misc
Subject: Re: Algol-style semicolons
Message-ID: <8812211614.AA10691@queen.csri.toronto.edu>
Date: 21 Dec 88 16:14:14 GMT
References: <1126@etive.ed.ac.uk> <208100002@s.cs.uiuc.edu> <868@mcrware.UUCP> <8008@aw.sei.cmu.edu> <GARY.88Dec15142623@milo.mcs.clarkson.edu> <88Dec16.100919est.4327@turing.toronto.edu> <9235@ihlpb.ATT.COM>
Organization: University of Toronto, CSRI
Lines: 42