Path: utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!snorkelwacker!apple!usc!samsung!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!decuac!shlump.nac.dec.com!hiyall.enet.dec.com!reagan From: reagan@hiyall.enet.dec.com (John R. Reagan) Newsgroups: comp.lang.pascal Subject: Re: Integer to String Conversion Message-ID: <15670@shlump.nac.dec.com> Date: 27 Sep 90 18:16:19 GMT Sender: newsdaemon@shlump.nac.dec.com Organization: Digital Equipment Corporation Lines: 29 In article <1990Sep26.082929.9182@uwasa.fi>, ts@uwasa.fi (Timo Salmi) writes... >In article <24602@adm.BRL.MIL> chaudhury@physics.ucla.edu (CHAUDHURY, SHILADITYA) writes: >> I wonder if someone could point out a simple way to do integer to string >>conversion in SUN Pascal. I generate a number that needs to be part of a >>filename in : > >There is no trivial solution in a standard Pascal although the >resulting code will be brief. ... The new Pascal standard (Extended Pascal) now has a standard method to do this. You use the WRITESTR builtin routine. For example, var i : integer; s : string(32); begin i := 35; writestr(s,i); writeln(s); end --- John Reagan Digital Equipment Corporation reagan@hiyall.enet.dec.com Disclaimer: The opinions and statements expressed by me are not necessarily those of Digital Equipment Corporation. ---