[fpc-pascal] What is wrong with this enum and array related code

Frank Church vfclists at gmail.com
Sun Sep 12 13:51:08 CEST 2010


program testnums;
//{$APPTYPE CONSOLE}

uses
  Classes, SysUtils;
type
   stType =3D (stLite :=3D -100, stDb, stBothLite, stBothDb); //settings
location Type
   stTypes =3D Array [stType] of integer;
var
 d : stType;
 s : string;
 i : integer;
begin
 writeln('');
 for i :=3D Ord(low(stType)) to Ord(high(stType)) do
 begin
  d :=3D stTypes[i - Ord(low(stType))];
   writestr(s,d);
   writeln(d + ' ' + IntToStr(Integer(i)));
 end;
 readln;

end.

-- =

Frank Church

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
http://devblog.brahmancreations.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freepascal.org/lists/fpc-pascal/attachments/20100912/b3c0=
dae3/attachment.htm


More information about the fpc-pascal mailing list