Is there a way to give an INITIAL value to an enum?

Posted by Lieven De Foor on 28-Jan-2016 07:45

Hi,

Say I have the following enum

ENUM Condition:

DEFINE ENUM New
Used.
END ENUM.

And I have a class:

CLASS Product:

DEFINE PUBLIC PROPERTY Condition AS Condition /* INITIAL Condition:New */.
GET.
PRIVATE SET.

END CLASS.

The compiler doesn't seem to like this INITIAL statement.
Is this not supported (yet) for enums?

Posted by Mike Fechner on 28-Jan-2016 07:48

Unfortunately that is not supported for any kind of reference types.

Posted by Peter Judge on 28-Jan-2016 08:26

I know this is on the roadmap somewhere, but I couldn't find an Idea for it (so added one at community.progress.com/.../initial_option_supported_for_class_variables that refers back to this thread).
 

All Replies

Posted by Mike Fechner on 28-Jan-2016 07:48

Unfortunately that is not supported for any kind of reference types.

Posted by Peter Judge on 28-Jan-2016 08:26

I know this is on the roadmap somewhere, but I couldn't find an Idea for it (so added one at community.progress.com/.../initial_option_supported_for_class_variables that refers back to this thread).
 

Posted by Lieven De Foor on 28-Jan-2016 08:29

OK, you got my vote!

This thread is closed