HP SunSoft Pascal 4.0 Instrukcja Użytkownika Strona 69

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 333
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 68
The Pascal Compiler 45
3
The Pascal main program,
with.p (with statement)
program p;
type C = record re, im: integer end;
AC = array[1..2] of C;
RC = record C1, C2: C end;
PRC = ^RC;
procedure qq;
var
c: C;
ac: AC;
rc: RC;
prc: PRC;
begin
ac[1]:= c;
with ac[1] do
begin
re:= 1;
writeln(im);
end;
with prc^.C1 do
begin
writeln(im);
end;
end;
begin
qq;
end.
The commands to compile and
execute with.p
hostname% pc -Rw with.p
Mon Feb 20 16:28:34 1995 with.p:
In procedure qq:
w 18280 variable c is used but never set
w 18260 variable rc is neither used nor set
w 18280 field prc^.C1.im is used but never set
hostname% a.out
0
*** a.out terminated by signal 11: segmentation violation
*** Traceback being written to a.out.trace
Abort (core dumped)
Przeglądanie stron 68
1 2 ... 64 65 66 67 68 69 70 71 72 73 74 ... 332 333

Komentarze do niniejszej Instrukcji

Brak uwag