118
Pascal 4.0 User’s Guide
6
Strings of Characters
The
alfa
and
string
types pass simply; varying strings are more
complicated. All pass by reference.
The Pascal main program,
SimRefMain.p
program SimRefMain(output);
var
t, f: boolean;
c: char;
si: integer16;
i: integer;
sr: shortreal;
r: real;
procedure SimRef(
var t, f: boolean;
var c: char;
var si: integer16;
var i: integer;
var sr: shortreal;
var r: real);
external c;
begin
SimRef(t, f, c, si, i, sr, r);
writeln(t, f: 6, c: 2, si: 2, i: 2, sr :4:1, r :4:1);
end. { SimRefMain }
The commands to compile and
execute
SimRef.c
and
SimRefMain.p
hostname% cc -c SimRef.c
hostname% pc SimRef.o SimRefMain.p
hostname% a.out
true false z 9 9 9.9 9.9
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......