>Like:
>--procedure comment
>SET VAR s#variable TEXT
><procedure>
>CLEAR s#%

Similar, but ther s#variable is still accessible globally. One aspect of
that hasn't been mentioned is scoped variables, is the fact that the same
variable name can be used in differnet function/procedures and be a
different data type and hold different values.

example using LOCAL scope

function 1
s#variable text = 'hi'

function 2
s#variable integer = 1

with this you can create a function and someone else could create another
function and both of you use the same variable name. So when you are
developing in a team you can then define scopes to communicate in complete
application.

Ben Johansen



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Ron Rose
Sent: Friday, June 01, 2001 3:10 PM
To: [EMAIL PROTECTED]
Subject: Scoped variables in RBase ?


Like:
--procedure comment
SET VAR s#variable TEXT
<procedure>
CLEAR s#%


Lawrence Lustig wrote:

> > What are scope variables?
>
> Scoped variables are variables that only exist in a
> certain part of your program.  In general, they exist
> for the duration a single function or procedure (the
> equivalent of a command block in R:Base).  That way,
> you can use variables in a small part of the program
> without worrying that you are overwriting an important
> value in some other part of the program.
> --
> Larry
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/



Reply via email to