Easy to Create, Easy to Change - Easy to use!


Problem with GetGlobal / SetGlobal functions while checking procedure .


Started by Luca
Search
You will need to Sign In to be able to add or comment on the forum!

Problem with GetGlobal / SetGlobal functions while checking procedure .

See below  an example :

....................................... .................................. ................................ ................................ ............................


Written by Luca 31/07/13 at 13:21:39 Dataease [{8}]FIVE

Re:Problem with GetGlobal / SetGlobal functions while checking procedure .

Hmmm…

This is a little headache.

SetGlobal(), GetGlobal() is an internal function now not a CDF.

And it is defined with “names” rather than numbers to make it more useful.

SetGlobal(“MyVar”,MyValue)

GetGlobal(“MyVar”).

We had a discussion about this at the time, but we decided that we couldn’t give away good internal function names to CDFs…..

We have tried as far as possible not to change functionality but add it, but some conflict between internal functions and CDFs can be a problem.


Written by DataEase 31/07/13 at 13:23:50 Dataease [{8}]FIVE

Re:Problem with GetGlobal / SetGlobal functions while checking procedure .

SetGlobal()/GetGlobal() are now renamed to SetVar() and GetVar().

You can now use the old CDF and the new functions in parallel.

If you have used the the new internal format for SetGlobal()/GetGlobal() you will have to rename them in your code.

We are sorry for the inconvenience.

Written by DataEase 05/08/13 at 13:41:53 Dataease [{8}]FIVE

Re:Re:Problem with GetGlobal / SetGlobal functions while checking procedure .

It's not a good idea to change how existing functions, etc, work, especially with such a commonly used function as this one.

Could you not have given the internal version of this function a different name? e.g. GetVariable, or GetVar.

There is also an advantage to having the number, as it means you can view the currently used values with a getGlobal ( number ), or with my Looper table of integers with getGlobal ( LoopNo ). Of course, if there were some other way to know what any 'global' variable contains at any one moment, and what the names of them are, etc, that would also be very useful, but in the absence of that, my looper technique has served me very well.


Written by Adrian Jones 02/08/13 at 14:04:19 Dataease [{8}]FIVE

Re:Re:Re:Problem with GetGlobal / SetGlobal functions while checking procedure .

Very good point Adrian and the time to correct it is now and the new name is GetVar()/SetVar().

Luckily this is the only one, was worse when hole functionality was replaced like the Old Memo with the New memo or Lookup fields with Multi fields.... 

Written by DataEase 02/08/13 at 14:34:42 Dataease [{8}]FIVE

Re:Re:Re:Problem with GetGlobal / SetGlobal functions while checking procedure .

You can of course still use numbers and loop through them if that is what you want as DataEase automatically converts numbers to text when you use a variable, so in that use case there will be no difference.

Written by DataEase 05/08/13 at 13:40:19 Dataease [{8}]FIVE

Re:Re:Re:Problem with GetGlobal / SetGlobal functions while checking procedure .

Adrian Jones wrote:
"There is also an advantage to having the number, as it means you can view the currently used values with a getGlobal ( number ), or with my Looper table of integers with getGlobal ( LoopNo ). Of course, if there were some other way to know what any 'global' variable contains at any one moment, and what the names of them are, etc, that would also be very useful, but in the absence of that, my looper technique has served me very well."

You can still use the looper technique if you want to, nothing stopping one from using numbers still. The difference is that one can now also use variable names that is much easier for "human" brains to relate to.

You know if you called your variable "CustomerNumber", but it is hard to remember if it is 97 or 67.

Written by DataEase 01/10/13 at 09:16:45 Dataease [{8}]FIVE