Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UDF name conflicts with new function name
Message
From
20/10/2006 11:16:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01163604
Message ID:
01163668
Views:
9
>>>Hi All,
>>>
>>>A colleague has since long a UDF named ISTR() that is used in many places. Since vfp9 there is a new function named ISTRANSACTABLE() that can also be shortened to ISTR(). The UDF is no longer found.
>>>
>>>Is there any way of dealing with this situation other that going through the tedious and dangerous process of searching and replacing all occurences of the UDF?
>>
>>Perhaps a #DEFINE, if the programmer uses #INCLUDE files consistently.
>>
>>But I would prefer a search and replace.
>
>Agree. Thx for the advice.

I think I should elaborate on the #DEFINE suggestion. The following might be obvious to you, but I'll include it, for the benefit of others.

Your istr() function should be renamed, for instance, to MyIstr().

Then, you can
#DEFINE istr MyIstr
All programs, of course, should have the appropriate #INCLUDE directive, the include file must also be specified in all forms and classes. (As many developers are doing already.)

I think you can still use istransactable(), as long as you don't abbreviate it to four letter.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform