Bug: string cannot be given an initial value
Hi, Thank you for providing GNU Pascal! In the process of migrating from Prospero Pascal to GNU Pascal, it seems I found a bug in the latter. Given the following program: program stringtest; type record_with_empty_string = record empty_string : string(127) {VALUE ''}; end; some_records_with_empty_string(length : integer) = array[1..length] of record_with_empty_string; five_records_with_empty_string = some_records_with_empty_string(5); begin end. This program compiles. But if you uncomment the initial value of empty_string, GPC complains with "initial value of discriminated schema type is of wrong type". Things like this used to work with Prospero. Is there a workaround? Thanks, Bastiaan Veelo.
participants (5)
-
Adriaan van Os -
Bastiaan Veelo -
Markus Gerwinski -
Russell Whitaker -
Waldek Hebisch