"Prof A Olowofoyeku (The African Chief)" wrote:
On 23 Mar 2005 at 20:05, CBFalconer wrote:
"Prof A Olowofoyeku (The African Chief)" wrote:
On 22 Mar 2005 at 22:28, Frank Heckenbach wrote: [...]
Of course, you could also convert the octal to (hexa)decimal numbers.
[...]
Can we have a series of conversion routines (perhaps in gpcutil.pas)? octal2hex hex2octal int2octal octal2int
Here is some C code to do that, together with demo and testing routines. Totally portable. Use as you wish.
[...]
Thanks for this. But my knowledge of C is not good enough to translate everything correctly. I was really asking whether these routines could be provided in an "official" GPC unit.
Why translate? Just strip the testing code (marked), compile, and call. gpc has the capability of calling C code and there is nothing unusual in that code.