Forum Post: Re: Enum Init Value (oe 11.6)

Status
Not open for further replies.
L

Laura Stern

Guest
Actually, there really is no such thing as a reference type in the ABL other than perhaps BY-REFERENCE temp-tables. I suppose you could think of an object reference or handle that way. But really the reference or handle is just passed by value when used a parameter. Anyway, so much for philosophy. I think it is very valid question. But I believe the answer is that in order to do the initialization that way the AVM would have to create an instance of the enum during the DEFINE statement. The AVM does not support doing that at the moment. Though I have to say that with Enums it would be easier in that there really is no possibility of an error as you might have with another class. No code is actually run, like you would have with a constructor of any other class type. But as it is conceivable that we may allow more code in enums in the future, this would be a dangerous thing to rely on.

Continue reading...
 
Status
Not open for further replies.
Top