| 12345678910111213141516171819202122232425262728293031 |
- program t98_realfunc;
- { t98 -- a REAL function result. `three' returns six bytes through the
- caller's scratch address; a VAR REAL parameter copies it into a record
- field, which Str then formats. }
- type
- R = record
- V : real;
- end;
- var
- A : R;
- S : string[10];
- function three : real;
- begin
- three := 3
- end;
- procedure put (var Z : real);
- begin
- Z := three
- end;
- begin
- A.V := 0;
- put (A.V);
- Str (A.V : 0 : 0, S);
- writeln (S)
- end.
|