我正在尝试为一周中的几天制作自定义数据类型,但我无法写它.编译器错误说明:
[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.
它在Windows上的Delphi 7中.