| 123456789101112131415161718192021222324252627282930 |
- program t99_valreal;
- { t99 -- value REAL parameters. `id(X : real)' receives a six-byte copy on
- the stack; the argument is a VAR REAL parameter inside `put'. }
- type
- R = record
- V : real;
- end;
- var
- A : R;
- S : string[10];
- function id (X : real) : real;
- begin
- id := X
- end;
- procedure put (var Z : real);
- begin
- Z := id (Z)
- end;
- begin
- A.V := 3;
- put (A.V);
- Str (A.V : 0 : 0, S);
- writeln (S)
- end.
|