gm2
[Top][All Lists]
Advanced

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

[Gm2] possible bug in StringConvert.CardinalToString and other conversio


From: Carl Glassberg
Subject: [Gm2] possible bug in StringConvert.CardinalToString and other conversion procedures
Date: Fri, 12 Feb 2010 17:30:52 -0800 (PST)

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







      




reply via email to

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