Hi All,
I was debugging the following linked list program with a record under gdb, but
when I tried to see what one of the members of the record was, I get "void,
void, void." Do any of you know what's wrong?
Source File of Program:
program Test;
type
pointer = ^cell;
string10 = packed array[1..10] of char;
cell =
record
word : string10;
next : pointer;
end;
var ptr:pointer;
begin
new(ptr);
ptr^.word := "Hello";
writeln(ptr^.word);
end.
Futile debugging attempt under gdb:
(gdb) run
Starting program: c:/emacs/my/pointers/test
Breakpoint 1, program_Test () at test.pas:14
14 writeln(ptr^.word);
(gdb) print *Ptr
$1 = {Word = {void, void, void, void, void, void, void, void, void, void,
void}, Next = 0x0}
(gdb) print Ptr->Word
$2 = {void, void, void, void, void, void, void, void, void, void, void}
(gdb)
The program works fine, writing out "Hello"
------------------------------------------------------
This message sent using the FirstClass SMTP/NNTP Gateway.
From:
Choate Rosemary Hall
333 Christian St.
Wallingford, CT. 06492