t95_strint.pas 365 B

12345678910111213141516171819
  1. program t95_strint;
  2. { t95 -- Str(integer, S). CALC.INC's Help does `Str(count,st)' after reading
  3. the help file. No width/decimals: TP3's default width for an integer is
  4. zero, and st is a string[10]. }
  5. var
  6. S : string[10];
  7. I : integer;
  8. begin
  9. I := 42;
  10. Str (I, S);
  11. writeln (S);
  12. I := -7;
  13. Str (I, S);
  14. writeln (S);
  15. Str (0, S);
  16. writeln (S)
  17. end.