Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I append without opening the edit window?
Message
From
28/06/2001 11:28:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
28/06/2001 11:26:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00524283
Message ID:
00524733
Views:
18
>>How difficult ? Why would I need the local declaration ? You mean it's sufficient to declare a memvar to make it available after method/event routine ends ??? If so how ?
>>
>>scatter memvar memo
>>
>>It's this simple since fox2.x (not seen fox1x).
>>Cetin
>
>No, I don't want to have the variable available after the method ends (this could be done by declaring the variable PUBLIC).
>
>What I do try to do is to avoid variables from other procedures from being overwritten. In this sense, LOCAL is similar to PRIVATE. Imagine the following scenario:
>
>Procedure_A declares a variable "Client_Code"
>Procedure_A calls Procedure_B
>Procedure_B issues a SCATTER, and changes the value of variable "Client_Code"
>Procedure_B finishes
>Procedure_A produces hard-to-debug errors, because the value of "Client_Code" changed.
>
>This can be solved by issuing one of the following in Procedure_B:
>
>local Client_Code
>   or
>private Client_Code
>
>
>This way, Procedure_B uses its own copy of the variable, and doesn't overwrite the variable of Procedure_A.
>
>Of course, it is quite possible you never encounter this situation, so "take it or leave it". However, I find it better to program "defensively": it is often better to avoid an error in the first place, than to debug it later.
>
>And, since you would have to declare several LOCAL or PRIVATE variables, a single variable (SCATTER ... NAME) is much easier.
>
>Regards, Hilmar.

OK got your point. How about :

private all
scatter memvar memo

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