gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] possible bug in StringConvert.CardinalToString and other conve


From: Gaius Mulley
Subject: Re: [Gm2] possible bug in StringConvert.CardinalToString and other conversion procedures
Date: Sat, 13 Feb 2010 01:52:31 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Carl Glassberg <address@hidden> writes:

> Hello, this is my first post, so if I do it badly, let me know.
>
> StringConvert.CardinalToString and probably other conversion procedures are 
> using DIV 10 and MOD 10 even if parameter base is NOT 10 
>
> is it possible that the problem is that these should be 
> ... DIV base 
> and 
> ... MOD base 
>
> instead? If this is a bug it appears in other procedures.
>
> I wrote a test program that
> 1.) generated a file of characters from 0C to 377C, one per line
>
> 2.) a second program reads the file in 1.) and attempts, using InOut.WriteOct 
> to display (characters < 40C) AND (characters > 176C) as an octal string 
> \ooo, where o are octal digits, where ooo are supposed to be output by 
> WriteOct (but with leading spaces rather than leading zeros).
>
> If you want to see my test program to verify this, let me know.
> All you really need to test this is to try: 
>
> InOut.WriteOct(8, 3)
>
> causes a program crash here. Try it with 198, etc.
>
> Carl

Hi Carl,

many thanks for the bug report - and your first post was great :-)
I think your suggestion as to where the bug resides is spot on..
Will fix it tomorrow,

regards,
Gaius





reply via email to

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