On 02/07/17 18:26, Ondrej Pokorny wrote:
On 02.07.2017 18:20, Jonas Maebe wrote:
Range checking code is generated for operations involving enums if, according to the type system, the enum can be out of range. Just like with integer sub-range types.

Allow me a stupid question: how to convert an integer to enum with range checking?

The current possibilities and possibly improvements have been mentioned elsewhere in this thread already
* http://lists.freepascal.org/pipermail/fpc-devel/2017-July/038013.html
* http://lists.freepascal.org/pipermail/fpc-devel/2017-July/038014.html


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to