Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To fix or not to fix, that is the question
Message
From
11/07/2006 13:55:34
 
 
To
11/07/2006 10:57:29
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01135306
Message ID:
01135438
Views:
11
>
>Only the routines where the array is passed refer to that array. However, since the array is received in the UDF with PARAMETERS not LPARAMETERS and the name is kept the same, any called routines would also be accessing the passed array, yes?
>
>I would prefer to change all calls to stop using DO and clearly specify how things are being passed. However, I can't quickly be sure that all arrays are passed to the functions.
>
>It is more wrong to have inconsistent architecture (than inconsistent style). By that I mean part of the code refers to different pseudo-public private arrays while these parts are passing the array. So I'll document that the array needn't have been passed and what change should be made.

Mike,
make sure that the UDF is *always* called with *that* array as a parameter. What I once inherited was that in ONE makroexpanded call another array was passed, which from then on shadowed the previous private array until the UDF returned. Since it was inside a step-wise built macro, my search across the code had not found it. One of the times I asked for a sandbag to work off my anger...

regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform