HP SunSoft Pascal 4.0 Instrukcja Użytkownika Strona 67

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 333
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 66
The Pascal Compiler 43
3
Examples:
The Pascal main program, r.p
(record and array of records)
program p;
procedure qq;
type compl = record re, im: integer end;
arc = array[1..2] of compl;
var z: compl;
a: arc;
begin
writeln(z.im);
writeln(a[1].re);
end;
begin
end.
The commands to compile r.p
and the -Rw warnings that are
issued
hostname% pc -Rw r.p
Fri Jan 27 17:35:50 1995 r.p:
In procedure qq:
w 18280 field z.im is used but never set
w 18280 field a[...].re is used but never set
The Pascal main program,
rr.p (two records)
program p;
type r = record a,b: integer end;
procedure qq;
var r1, r2: r;
var i: integer;
begin
i:=r1.a;
i:=r2.a;
i:=r1.b;
i:=r2.b;
end;
begin
qq;
end.
Przeglądanie stron 66
1 2 ... 62 63 64 65 66 67 68 69 70 71 72 ... 332 333

Komentarze do niniejszej Instrukcji

Brak uwag