[fpc-pascal] different windows/linux behavior with enumerated types and write/writeln

Marco van de Voort marcov at stack.nl
Wed Jan 20 21:11:22 CET 2010


In our previous episode, Jonas Maebe said:
> > In other words, it actually prints out the name of the enumerated value.
> > 
> > In windows the program does not compile with an error of "Error: Can't
> > read or write variables of this type".
> > 
> > Why the difference in behavior?
> 
> Different compiler version. The above is only possible as of 2.4.0.

(as confirmation:

C:\>fpc test.pp
Free Pascal Compiler version 2.4.0 [2009/12/18] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Win32 for i386
Compiling test.pp
Linking test.exe
12 lines compiled, 0.3 sec , 26912 bytes code, 1640 bytes data

C:\>test
seth

C:\>






More information about the fpc-pascal mailing list