🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6098

Re: Pascal Semicolons

#6098
From: Stan Switzer
Date: Thu, 05 Jan 1989 18:11
28 lines
1724 bytes
Because of the null statement you can always have as many semicolons
as you want before an "end," but beware: sooner or later you'll end
up putting one in front of an "else" and you'll wind up scratching your
head for 20 minutes trying to figure out your syntax error.

  while n < 10 then
    begin
      n := n + 1;
      j := j + n;   (* kind of like a terminator, hmm... *)
    end;
  if j < 100 then
    writeln( 'small' );
  else		   (* Oops! What's this else doing here! *)
    writeln( 'large' );
    
Basically you're damned if you do and damned if you don't.  If you use
the semicolon before the end (pretending that it's a terminator)
you'll probably slip up and put it in front of an else.  If you don't
you'll probably forget to go back and add a semicolon when you insert
a new statement before the end.  Pity if you had to deal with this
nonsense in batch mode with long turn-around times and especially
using punched cards.

Stan Switzer	sjs@ctt.bellcore.com 	
"Waghdas, City of Knowledge, is a center for outfitting pilgrims to the
 Western Lands.  Since the dangers are manifold and different for each
 pilgrim, what equipment and provisions he will need is conjectural."
	-- _Western Lands_,  W. S. Burroughs
Technical Details
Message-ID: <13209@bellcore.bellcore.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!husc6!rutgers!bellcore!spectral!sjs
References: <2392@ncsuvx.ncsu.edu> <208100003@s.cs.uiuc.edu> <748@sigmast.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!husc6!rutgers!bellcore!spectral!sjs
From: sjs@spectral.ctt.bellcore.com (Stan Switzer)
Newsgroups: comp.lang.misc
Subject: Re: Pascal Semicolons
Message-ID: <13209@bellcore.bellcore.com>
Date: 5 Jan 89 18:11:35 GMT
References: <2392@ncsuvx.ncsu.edu> <208100003@s.cs.uiuc.edu> <748@sigmast.UUCP>
Sender: news@bellcore.bellcore.com
Reply-To: sjs@spectral.UUCP (Stan Switzer)
Organization: Bellcore
Lines: 28