[Info-vax] Pascal question

John Reagan xyzzy1959 at gmail.com
Mon Jan 21 11:05:01 EST 2019


On Monday, January 21, 2019 at 10:26:00 AM UTC-5, Emilio Moreno wrote:
> In turbo Pascal there is a function called str.
> It converts an integer into a string.
> Is there an equivalent in HP Pascal?

As Brian mentioned, the DEC() builtin (along with UDEC, BIN, OCT, and HEX) turn a numeric value into a string.

program x(output);
   var i :  integer;
   begin
      i := 12345;
      writeln(i);
      writeln(dec(i,10,8));
      writeln(hex(i,10,8));
   end.
$ pascal dec
$ link dec
$ run dec
     12345
  00012345
  00003039



More information about the Info-vax mailing list