[fpc-pascal] Changing variable in conditional

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Wed Jan 9 20:19:08 CET 2013


Marco van de Voort wrote:
> In our previous episode, Mark Morgan Lloyd said:
> 
>> [a, b, c] := (d = e);
>>
>> would have been minimally acceptable.
> 
> Did you really mean that or did you mean 
> 
>  [a, b, c] := (d := e);
> 
> ? :-)

:-) I meant what I wrote: a comparison on the right producing a Boolean 
which is assigned to three variables in a list. The parentheses were to 
try to make it a bit clearer, and I note that a Perl list is in 
parentheses rather than brackets.

I'm not saying I like it, or that it's Pascal. But something like that 
would probably upset the fewest people that matter. Perhaps I should 
have said

[a, b, c] += Ord(d = e);

:-)

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list