<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Dear Yannis,<br>
<br>
in Pascal, the semicolon seperates two statements, whereas in
ALGOL and C, the semicolon terminates a statement.<br>
<br>
Or in Pascal, the semicolon is never part of a statement and in C
it is always is part of a statement.<br>
<br>
In Pascal, the empty string is a statement, called "empty
statement". It does nothing.<br>
So in parts of the program, where the syntax rules allow one or
more statements, you can always put the semicolon without changing
the meaning of the program.<br>
<br>
But there are places, where only one statement is accepted,
notably the 'then' part of an if statement: A semicolon after the
statement in the 'then'-part ends the 'if'-statement, which is
followed by the empty statement. If your if-statement does have an
else part, an 'else' is following the empty statement. But 'else'
may only follow the 'then' part of the 'if'-statement, not the
if-statement as a whole.<br>
<br>
Unfortunately, some people misuse the empty statement and feel
licensed to terminate every statement with a semicolon -- A
confusing step backward in the evolution of ALGOL-like languages.
A step forward of course is Dijkstra's Guarded Commands notation.
In fact, the empty statement is the very first statement in
Dijkstra: "A Discipline of Programming", 1976, p. 25. and in
Jensen, Wirth: "Pascal User Manual and Report", 3rd ed. 1985, p.
169.<br>
<br>
Alas, compilers are rare for dot.not, as I prefer to call
Dijkstra's notation. You recognize by its dots in the notation for
arrays.<br>
<br>
greetings,<br>
Wolfgang<br>
</div>
<blockquote type="cite"
cite="mid:CBF7CA65-809A-4979-9CC4-65D9119E1268@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
dear Karl,
<div class=""><br class="">
</div>
<div class="">thanks for your answer. I finally found the error,
it was an unnecessary semicolon after an "end".</div>
<div class=""><br class="">
</div>
<div class="">I have a hard time finding the precise rules: when
are semicolons after "end" necessary / optional / forbidden?</div>
<div class=""><br class="">
</div>
<div class="">(The only thing I know for sure is that the
semicolon is forbidden when we are in an if-test</div>
<div class="">and an "else" is following:</div>
<div class=""><br class="">
</div>
<div class="">if xxx begin xxx end else begin xxx end; <---
no semicolon between "end" and "else"</div>
<div class=""><br class="">
</div>
<div class="">but beside that I couldn't find precise information
and TeX's Pascal code is either not very consistent</div>
<div class="">with respect to semicolons or maybe it follows some
pattern that I wasn't able to find out yet…)</div>
<div class=""><br class="">
</div>
<div class="">Thanks again for your help,</div>
<div class=""><br class="">
</div>
<div class="">Yannis</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">Le 21 mars 2021 à 02:57, Karl Berry <<a
href="mailto:karl@freefriends.org" class=""
moz-do-not-send="true">karl@freefriends.org</a>> a
écrit :</div>
<br class="Apple-interchange-newline">
<div class="">
<div class=""> Is there a way to localize the error? <br
class="">
<br class="">
For the record, this is the brief reply I sent to when
Yannis asked me<br class="">
separately. It's all I have. Web2c is a lousy
development environment,<br class="">
no question.<br class="">
<br class="">
-----------------------------------------------------------------------------<br
class="">
Date: Fri, 19 Mar 2021 11:19:09 -0700<br class="">
From: Karl Berry <<a
href="mailto:karl@freefriends.org" class=""
moz-do-not-send="true">karl@freefriends.org</a>><br
class="">
To: <a href="mailto:yannis1962@gmail.com" class=""
moz-do-not-send="true">yannis1962@gmail.com</a><br
class="">
Subject: Re: Debugging<br class="">
In-Reply-To: <<a
href="mailto:466F362F-4E43-4655-B0FC-2710ABD215AD@gmail.com"
class="" moz-do-not-send="true">466F362F-4E43-4655-B0FC-2710ABD215AD@gmail.com</a>><br
class="">
<br class="">
Can you tell me how to localize the error?<br
class="">
<br class="">
There is no good way. Just have to go back to the
original, make sure it<br class="">
works, and add individual lines until you find the
error, which<br class="">
apparently has something to do with "true" and a
semicolon.<br class="">
<br class="">
Sometimes the .c file(s) left in (in your case)<br
class="">
/var/folders/1n/fvs3dd2d5gqghwcw8khb41_h0000gn/T/<br
class="">
as given by the error msg provide a clue. [...]<br
class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color:
rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; text-decoration: none; word-wrap: break-word;
-webkit-nbsp-mode: space; line-break: after-white-space;"
class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0);
letter-spacing: normal; text-align: start; text-indent:
0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none; word-wrap: break-word;
-webkit-nbsp-mode: space; line-break: after-white-space;"
class="">
<table style="background-color: rgb(241, 241, 241);
border: 1px solid rgb(221, 221, 221);" class="">
<tbody class="">
<tr class="">
<td colspan="3" class=""><br>
</td>
</tr>
<tr class="">
<td class=""><a href="http://www.imt-atlantique.fr"
target="_blank" class="" moz-do-not-send="true"><img
src="http://img.mines-telecom.fr/signature-mail/logos/logo-imta.png"
title="Site web IMT Atlantique" alt="IMT
Atlantique" style="padding: 4px 0px 4px 4px;"
class="" moz-do-not-send="true"></a></td>
<td class="">
<div style="float: left; font-style: normal;
font-variant-caps: normal; font-weight: normal;
font-stretch: normal; font-size: 13px;
line-height: 1.5; font-family: sans-serif;
color: rgb(85, 85, 85); padding: 8px 15px;"
class=""><strong class="">Yannis HARALAMBOUS</strong><br
class="">
Professor<br class="">
Computer Science Department<br class="">
UMR CNRS 6285 Lab-STICC<br class="">
<a
href="http://perso.telecom-bretagne.eu/yannisharalambous/"
target="_blank" style="text-decoration: none;"
class="" moz-do-not-send="true"><img
src="https://img.mines-telecom.fr/signature-mail/social/web.png"
title="Site web IMT Atlantique" alt="Site
web IMT Atlantique" style="padding: 3px 10px
4px 0px;" class="" moz-do-not-send="true"></a><a
href="https://twitter.com/y_haralambous"
target="_blank" style="text-decoration: none;"
class="" moz-do-not-send="true"><img
src="https://img.mines-telecom.fr/signature-mail/social/twitter.png"
title="Twitter IMT Atlantique" alt="Twitter
IMT Atlantique" style="padding: 3px 10px 4px
0px;" class="" moz-do-not-send="true"></a><a
href="https://www.linkedin.com/in/yannis-haralambous-5529073?trk=hp-identity-name"
target="_blank" style="text-decoration: none;"
class="" moz-do-not-send="true"><img
src="https://img.mines-telecom.fr/signature-mail/social/linkedin.png"
title="LinkedIn IMT Atlantique"
alt="LinkedIn IMT Atlantique"
style="padding: 3px 10px 4px 0px;" class=""
moz-do-not-send="true"></a></div>
<div style="float: left; font-style: normal;
font-variant-caps: normal; font-weight: bold;
font-stretch: normal; font-size: 11px;
line-height: 1.5; font-family: sans-serif;
color: rgb(136, 136, 136); padding: 8px 15px;"
class="">Technopôle Brest-Iroise CS 83818<br
class="">
29238 Brest Cedex 3, France<br class="">
Une école de<span class="Apple-converted-space"> </span><a
href="http://www.imt.fr" target="_blank"
class="" moz-do-not-send="true">l'IMT</a></div>
</td>
</tr>
<tr class="">
<td colspan="3" class=""><br>
</td>
</tr>
</tbody>
</table>
<p class=""><i class="">Any sufficiently advanced bug is
indistinguishable from a feature.</i> (Rich
Kulawiec)<br class="">
<br class="">
</p>
</div>
</div>
</div>
<br class="">
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Wolfgang Helbig
Stauferstr. 22
71334 Waiblingen
07151-920 227</pre>
</body>
</html>