Path: 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: Date: 16 Oct 90 14:25:21 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Modula2 List Organization: The Internet Lines: 20 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