I'm trying to make a custom data type for days of the week but I can't get it to write it. The compiler error says this:
[Error] hours.dpr(28): Illegal type in Write/Writeln statement
program hours;
{$APPTYPE CONSOLE}
uses
SysUtils;
type
TypeDay = (Sun,Mon,Tue,Wed,Thu,Fri,Sat);
var day: TypeDay;
begin
for day := Sun to Sat do
begin
writeln(day);
end;
end.
It's in Delphi 7 on Windows.