Article View: comp.lang.modula2
Article #1251Re: integer to longreal
From: Greg Granger
Date: Tue, 16 Oct 1990 14:25
Date: Tue, 16 Oct 1990 14:25
20 lines
1046 bytes
1046 bytes
On Mon, 15 Oct 90 20:42:34 GMT Durand Barry P said:
>Does anyone out there know how to convert an integer to a longreal
>(in modula2 ofcourse).
>
>Thanks,
Well depends, which Modula 2 are you using? Try looking at the
VAL procedure.
In TopSpeed it would be something like this:
i: INTEGER;
x: LONGREAL;
....
x:= VAL(LONGREAL, i);
Of course some other version may (prob'ly will) do it differently.
You might also check the FLOAT procedure (in the "standard" (3th ed)
it's for converting CARDINAL to REAL).
Greg
Technical Details
Message-ID:
<INFO-M2%90101610301278@UCF1VM.BITNET>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!uwm.edu!bionet!agate!ucbvax!VTVM1.BITNET!GRANGERGReferences:
<sdd.hp.com!wuarchive!rex!rouge!bpd5428@UCSD.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!uwm.edu!bionet!agate!ucbvax!VTVM1.BITNET!GRANGERG From: GRANGERG@VTVM1.BITNET (Greg Granger) Newsgroups: comp.lang.modula2 Subject: Re: integer to longreal Message-ID: <INFO-M2%90101610301278@UCF1VM.BITNET> Date: 16 Oct 90 14:25:21 GMT References: <sdd.hp.com!wuarchive!rex!rouge!bpd5428@UCSD.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Modula2 List <INFO-M2%UCF1VM.BITNET@ucf1vm.cc.ucf.edu> Organization: The Internet Lines: 20