If I have a program like this:

------------------------------------------------------
program Project1;

{$mode objfpc}{$H+}

type
  whatever = (seth, paul, ken);
var
  haha : whatever;
begin
  haha := seth;
  writeln(haha);
end.
------------------------------------------------------

I can compile it in linux with FPC and run it and get the following output:

------------------------------------------------------
$ ./project1
seth
------------------------------------------------------

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?

-SG

--
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.

Seth Grover
sethdgrover[at]gmail[dot]com
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to