[V4REV] symbolic constants // Based on Assoc Array
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon May 16 12:16:58 CDT 2005
On 5/13/05 12:48 PM, "Robert Brenstein" <rjb at robelko.com> wrote:
>> On 5/13/05 2:52 AM, "Robert Brenstein" <rjb at robelko.com> wrote:
>>
>>> c) instead of creating a hundred of variables, it may be better to
>>> create a single array variable, so there is only a single name to
>>> declare as global. Surely more user-friendly and more
>>> self-documenting. And we can get a list of all declared values in a
>>> single call, using the keys() function.
>>
>> Interesting!
>> please show me in transcript itself how this can looks
>
> Valentina has associative arrays:
>
> put 3 into myArray["item1Name"]
> add 1 to myArray["item1Name"]
>
> to see what elements an array has defined
>
> answer the keys of myArray
>
> We can also use split and combine to convert between normal vars and arrays.
Okay Robert.
Then what about next solution:
1) Valentina define several global assoc array, to simulate enums of other
languages. Names will be again similar:
EVDebugLevel
EVDbMode
EVFlags
...
And Now you can write
SqlSelect(
query, EVCursorLocation["kServerSide"], EVAccess["kReadWrite"] )
Only problem, I think this way will have slower access to constant values.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list