Hello!
Tom Schneider wrote:
[...]
makelogo.p: In function `Themain': makelogo.p:4093: cannot take address of bitfield `B'
Line 4093 is: readln(symvec,map[b].b, map[b].n);
b is defined as:
b: integer; (* index to a symbol *)
map is defined as:
position = 0..mapmax; place = packed record b: char; (* the symbol *) n: integer (* the number of symbols *) end;
so is it getting confused about the "two" uses of b?
No, the problem is that `b' is a member of a *packed* record.
Normally, it is illegal to pass fields of packed records as `var' parameters. Anyway for `readln' the standard allows an exception, so you have indeed found a bug in GPC.
If you remove `packed' from the record's declaration the problem disappears. Alternatively, as you already know, you can use a temporary variable.
Hope this helps, and thanks for the report,
Peter