[Oberon] SystemV - Integer2String, String2Integer

Chris Burrows chris at cfbsoftware.com
Wed Jan 16 12:23:50 CET 2019


> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Tomas Kral
> Sent: Wednesday, 16 January 2019 9:16 PM
> To: Oberon at lists.inf.ethz.ch
> Subject: [Oberon] SystemV - Integer2String, String2Integer
> 
> Hi,
> 
> I am thinking of functions `DrawText()', `DrawInt()', etc added to
> `Display1.Mod'.
> 
> I may therefore need the above conversions. What is usual naming and
> where these are typically placed?
> 
> TYPE String = ARRAY OF CHAR;
> 
> IntToString(in: INTEGER; VAR out: String);
> StringToInt(in: String; VAR out: INTEGER);
> 
> Either in `In.Mod', `Out.Mod', `String.Mod' (non-existent on my
> system yet)?
> 

In ETH Oberon for Windows (Oberon-2) there exists a module Strings with
procedures:

	PROCEDURE StrToInt*(VAR str: ARRAY OF CHAR; VAR val: LONGINT);

	PROCEDURE IntToStr*(val: LONGINT; VAR str: ARRAY OF CHAR);

In Astrobe (Oberon-07) we have the same functions (with INTEGER instead of
LONGINT) but separated them out from Strings into a module called Convert to
prevent Strings from getting too large.

Regards,
Chris 

Chris Burrows
CFB Software
http://www.astrobe.com/RISC5





More information about the Oberon mailing list