gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ReadCard and ReadInt from WholeIO have problems with leading space


From: Gaius Mulley
Subject: Re: ReadCard and ReadInt from WholeIO have problems with leading space
Date: Fri, 12 May 2023 16:37:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Rudolf Schubert <rudolf@muc.de> writes:

> Hi Gaius,
>
> there is absolutely no need for you to apologize if you missed one
> of my 'bug mails'. On the contrary, it's me nearly feeling bad
> constantly delivering 'bad news'! In fact I appreciate your project
> very much and are very confident that, say around 2038 (that's the
> time when my old GPM version will wrap time!), GM2 will be the best
> Modula compiler in the world;-)

Hi Rudolf,

lol, many thanks - the bug reports are extremely useful - keep them
coming in :-).  They often prompt other fixes as well - the array
overflow yesterday also fixed virtual token accuracy (as a by product).

> But nonetheless I come with a new bug report. This time it's a leading
> space when reading INTEGERs (or CARDINALs) which seems to cause trouble.
> Please see attached test program port_test10a_gm2.mod.
>
> With GPM my output is this:
>
> write (INTEGER) numbers to file...
> read numbers with ReadCard...
> 123
> 234
>
> read numbers with ReadInt...
> 123
> 234
>
>
> But with GM2 I see this:
>
> write (INTEGER) numbers to file...
> read numbers with ReadCard...
> 0
> 234
>
> read numbers with ReadInt...
> +4302659
> +234
>
> One obvious difference between GPM and GM2 is the leading '+' with WriteInt.
> GPM does NOT put a leading '+' whereas GM2 does. This is probably because the
> 'ISO wording' is not quite clear if this leading '+' is mandatory or in the
> case of positive values might be optional as is usual with 'everyday 
> mathematics'.
>
> But the 'real' problem here is the first number (123) with the leading space.
> There ReadCard as well as ReadInt seem to get confused and do not simply 'skip
> leading space'.

thanks I'll check this out and fix,

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]