[fpc-pascal] Parsing Smalltalk-style numbers

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sun Mar 2 19:12:44 CET 2014


Does anybody have any Pascal code to hand which will parse 
Smalltalk-style numbers, i.e. written with an explicit radix indicator?

For example, 8r34.1 (octal) parses to 28.125 (decimal) and 2r11e6 parses 
to 192 (examples from the Smalltalk "Blue Book").

I know it's not too difficult, I'm just trying to save myself a bit of 
work if possible.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list