Prime app variables
|
12-13-2013, 05:42 PM
Post: #4
|
|||
|
|||
RE: Prime app variables
(12-13-2013 05:27 PM)Jonathan Cameron Wrote: Thanks Han, No, local variables are entirely different as their scope is limited to the (sub)program that delcares them. When you use EXPORT, you are essentially creating a global name (either a variable or a program) that becomes visible to the user. They can interact with it. These global variables are likewise accessible by any other program (be it within the app, or even from outside the app provided the calling program uses the proper app prefix). If you want to create a variable that is likewise accessible to programs, but NOT to users, then you simply remove the export command. So for example, the source to your app may have: Code:
So in the snippet above, the local variables are a, b, c, x, y, r, s, and t and can only be accessed by their respective programs. The global variables myvar1 and myvar2 can be used by any program; however only myvar1 can be altered by users manually. For example, a user could simply type: myvar1:=9; to override the current value, whereas they cannot alter myvar2 whatsoever. Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Prime app variables - Jonathan Cameron - 12-13-2013, 03:33 PM
RE: Prime app variables - Han - 12-13-2013, 04:02 PM
RE: Prime app variables - Jonathan Cameron - 12-13-2013, 05:27 PM
RE: Prime app variables - Han - 12-13-2013 05:42 PM
RE: Prime app variables - Jonathan Cameron - 12-13-2013, 06:17 PM
RE: Prime app variables - Han - 12-13-2013, 07:28 PM
RE: Prime app variables - Bob Frazee - 12-13-2013, 09:44 PM
RE: Prime app variables - Han - 12-14-2013, 02:36 AM
RE: Prime app variables - Bob Frazee - 12-14-2013, 03:19 PM
RE: Prime app variables - Han - 12-14-2013, 09:19 PM
RE: Prime app variables - Bob Frazee - 12-15-2013, 04:02 AM
RE: Prime app variables - Han - 12-15-2013, 04:37 AM
RE: Prime app variables - Bob Frazee - 12-16-2013, 12:40 AM
RE: Prime app variables - cyrille de brébisson - 12-16-2013, 08:02 AM
|
User(s) browsing this thread: 1 Guest(s)