For the code segment below I get the errors listed. An error is not generated for "blank" as a label, so it seems that indexing a constant array of char confuses the compiler. Help would be appreciated.
--Chris Ferrall
fmopt_client.pas:212: `case' label does not reduce to a constant of ordinal type fmopt_client.pas:213: `case' label does not reduce to a constant of ordinal type fmopt_client.pas:214: `case' label does not reduce to a constant of ordinal type
type integer_options = (max_untyp,mxstarts,nfuncmax);
const blank = ' '; imn : array[integer_options] of char = ('u','r','n'); var lt : char;
... case lt of imn[mxstarts] : read(x_file,iopts[mxstarts]); imn[nfuncmax] : read(x_file,iopts[nfuncmax]); imn[max_untyp] : read(x_file,iopts[max_untyp]); eooptln : readln(x_file); blank : ; otherwise writeln('invalid integer option ',lt); end;