Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the purpose of LPARAMETERS
Message
 
 
To
13/06/2014 11:51:49
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01601772
Message ID:
01601831
Views:
38
Thank you for the detailed description.

>Hi Dmitry
>
>The easiest and fastest way to add a new piece of code to your project/exe is to add a .prg in a folder in your dev path. When you add a call to your function/procedure in the place where you need to call the function - you are only editing one place in your project. Fox will include the new prg into the project for you.
>
>No wasted time finding the procedure library, checking out the entire thing, compiling the entire thing and checking the entire thing back in. No wasted attempts by an imperfect source code "tool" to knit your new procedure into the library. When that tool knits your code in - all the other team members will be wasting time re-downloading the entire library and re-compiling it. In fact, the only persons on the team that need to recompile that new prg is the one writing it and the one building the exe for testing, that is unless the new prg is something every other team member needs.
>
>Inside that new prg, use lparameters.
>SOMETHING.PRG
>LPARAMETERS tcChar
>RETURN something
>
>That's only 2 lines of code.
>
>There is no benefit whatsoever to using the procedure / function declarations (as below), except as a way to put usually completely unrelated functions/procedures into a procedure library and document it.
>
>FUNCTION SOMETHING(tcChar as Integer)
>RETURN something
>ENDFUNC
>
>If I ...
>
>?SOMETHING()
>
>tcChar gets a logical value, there isn't even an error message that no integer was passed as clearly required/expected. OK, so I can add an ASSERT. Have to do that without the FUNCTION declaration - so no intrinsic value in the function declaration and even worse a wasted extra line of code. ENDFUNC. Really? Who wants the Funk to end? Not James Brown!
>
>
>>Hi,
>>
>>Specifically I mean, as far as the title, what is the purpose of the "L" in LPARAMETERS. I understand it means "local" but the following example shows that it is not quite local:
>>
>>
>>LOCAL lVar1, lVar2
>>
>>STORE 1 TO  lVar1, lVar2
>>
>>=TestFunct( lVar1, @lVar2 )
>>
>>? lVar1, lVar2
>>
>>FUNCTION TestFunct
>>LPARAMETERS lVar1, lVar2
>>
>>lVar2 = 122
>>
>>RETURN
>>
>>
>>Or does it mean that the "@" overrides the L in LPARAMETERS?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform