Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursive loop and SCAN
Message
From
26/07/2002 22:41:45
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00683191
Message ID:
00683195
Views:
29
>In general, for recursive code to work the variables should be local to the recursive function. A cursor is 'a global variable' in this case. Can you provide more info about what are you trying to do?

Yes, variables are local. However, it was my assumption that SCAN, for the ENDSCAN loop, was, not only resetting to the proper alias but also to the proper record. Correct me if I'm wrong, but it only resets to the proper alias. To resolve that issue in the recursive loop, I had to save the RECNO() before calling the recursive loop and restore it after. I guess this could be a nice improvment to request for the SCAN in the next version.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform