Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is SEEK command showing error?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00939863
Message ID:
00940008
Views:
23
><snip>
>>There are a couple of xBase commands in VFP that don't structure as designated in VFP. FOr example, the RETURN command is advertised as:
>>RETURN myValue to MyProcedure
>>But this will actually generate a compile error. However, if we switch the arguments around:
>> RETURN TO MyProcedure MyValue
>
>Actually the syntax is
RETURN [eExpression | TO MASTER | TO ProcedureName]
Which means that you can pick one of the options but cannot combine them.

Yes - but in errors when applied as prescribed:
*P1.PRG
cRet=P2()
?cRet
* End P1

*P2.PRG
*Following the prescribed syntax errors out
lc=[Hello World]
RETURN lc TO P1 && As prescribed will cause an error
* End P2 with error

*P2.PRG
*Changing the prescribed syntax will work
lc=[Hello World]
RETURN TO P1 lc  && Name of return to precedure before return value
* End P2 That works
IOW - the syntax the Help system prescribes does not work. To make it work, the return-to-procedure-name needs to be before the returned value!:)
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform