Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple procedures vs. one procedure - revisited
Message
From
10/06/2005 20:16:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/06/2005 14:07:47
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01022173
Message ID:
01022376
Views:
11
>>Everything added to set procedure list! Order is important, worse having multiple procedures open at same time there is no way to call a procedure from one of them selectively (I don't know at least - unless you use "do ... in ..." ). You better use classes.
>
>But the class definitions are searched along the same set proc list <g>...
>Clean coding practices or high attention are necessary when dealing whith duplicate names,
>regardless of them being class names or function names.
>
>But it is a nice dirty way to overwrite functions if you know what you are doing
>
>regards
>
>thomas

Thomas,
Not exactly. I don't say use 'set proc' anywhere. You can control which one you want if it's class based. ie:
FinCalc = NewObject("Calculator","Financial.prg")
SciCalc = NewObject("Calculator","Scientific.prg")

FinCalc.Calculate()
SciCalc.Calculate()
As you can see both classes have the same name and even the same methods they're distinguishable by their prg ( I somewhat find it like namespaces in C# ).

If it was not class based:
set procedure to Financial.prg, Scientific.prg
Calculate()
Would always be Financial calculation.

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform