etol() and ltoe()

Syntax
long etol( domain domain_value )


Description
This returns the numeric code corresponding to a specified value in an enumerated domain. 


Syntax
domain ltoe( long long_value )


Description
This returns the named constant corresponding to a specified numeric code. The numeric code represents one of the values in an enumerated domain. 


Example
This example assumes an enumerated domain 'yesno'  with two possible constants: 'yesno.yes’ (=1) and 'yesno.no’ (=2).
domain    yesno active
long      enum_long
active = yesno.no
enum_long = etol( active )    | enum_long now contains 2
active = ltoe( 1 )                     | active now equals yesno.yes


Related Post:

People who read this post also read :



0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More