[V4REV] symbolic constants

Robert Brenstein rjb at robelko.com
Mon May 16 12:15:41 CDT 2005


>On 5/13/05 12:27 PM, "Robert Brenstein" <rjb at robelko.com> wrote:
>
>>>  2) so if you agree that numeric values are devil, then you will start SELF
>>>  define symbolic variable in the same way in EACH function where you need it
>>>
>>>   on event     
>>>        kClientSide = 1
>>>        kReadOnly = 2
>>>        kRandom  = 2
>>>
>>>        VDatabase_SqlSelect( query, kClientSide, kReadOnly, kRandom )
>>>   end
>>
>>  a) Such names would not be, however, acceptable IMHO. They must be
>>  prefixed with gValentina_ for example to avoid name conflicts. The
>>  names you are suggesting are just too generic. Somebody else looking
>
>In the example above I have write them inside of FUNCTION,
>So no conflicts
>
>>  at my code might see kRandom not used for whatever reason and wonder
>>  what it is and where it is coming from. Using "g" to prefix a global
>>  var is quite common. See the following article
>>
>  > http://www.fourthworld.com/embassy/articles/scriptstyle.html
>


Yes, but I thought the discussion was about having them as globals. 
That is a big difference.

Robert


More information about the Valentina mailing list