Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Advantage and disadvantage of funct PRG
Message
From
04/12/2017 07:34:06
 
 
To
04/12/2017 07:08:44
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01656009
Message ID:
01656098
Views:
64
>>Mike, do you mean that you'd rather have a function in a .prg than in the form that called the function?
>
>Hi Bill
>
>Firstly you cannot have a function in a .prg.

Yes, you can. A prg can take parameters, and it can return a value.

>You can have methods in a form. I first extend FoxPro itself. For example a UDF like GetEndOfMonth is universal, so that's the first choice. If the piece of code belongs in a data object, that's the second place I choose. It may then be in a business object. The form should be the last place to put code.
Previous
Reply
Map
View

Click here to load this message in the networking platform