gm2
[Top][All Lists]
Advanced

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

Re: Query on FIO.WriteCardinal(StdOut,...)


From: Gaius Mulley
Subject: Re: Query on FIO.WriteCardinal(StdOut,...)
Date: Wed, 05 Jul 2023 17:17:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

john o goyo <jog37@riddermarkfarm.ca> writes:

> Greetings, Gaius.
>
> There seems to be a problem with FIO.WriteCardinal(StdOut,...).
>
> Here is my output.mod:
>
> MODULE output;
>
> FROM FIO IMPORT WriteString, WriteCardinal, WriteLine, StdOut;
>
> PROCEDURE WriteOut(n :CARDINAL);
> BEGIN
>    WriteString(StdOut, "n = ");
>    WriteCardinal(StdOut, n);
>    WriteLine(StdOut)
> END WriteOut;
>
> BEGIN
>    WriteString(StdOut, "Counting in gm2: ");
>    WriteOut(0);
>    WriteOut(1);
>    WriteOut(2);
>    WriteOut(3);
>    WriteOut(1000);
>    WriteOut(1024)
> END output.
>
> Here is the actual output:
>
> Counting in gm2: n =
> n =
> n =
> n =
> n =
> n =
>
> Please advise.
>
> Sincerely,
> john

Hi John,

ah yes I can confirm this is a bug.  It should of course emit binary
cardinal values:

$ od -A x -t x1z -v log
000000 43 6f 75 6e 74 69 6e 67 20 69 6e 20 67 6d 32 3a  >Counting in gm2:<
000010 20 6e 20 3d 20 00 00 00 0a 6e 20 3d 20 00 00 00  > n = ....n = ...<
000020 0a 6e 20 3d 20 00 00 00 0a 6e 20 3d 20 00 00 00  >.n = ....n = ...<
000030 0a 6e 20 3d 20 00 00 00 0a 6e 20 3d 20 00 00 00  >.n = ....n = ...<
000040 0a                                               >.<
000041

I'll open up a PR on bugzilla for this bug - thanks for the report!

regards,
Gaius



reply via email to

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