[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Local Procedures
- Subject: Re: Local Procedures
- From: "Merritt, Bruce" <Merritt@USCOLO.EDU>
- Date: Fri, 5 Apr 2002 17:09:44 -0700
I think it is
begin-procedure NEWLY_HIRED LOCAL or NEWLY_HIRIED(:$NEWHIRE)
The LOCAL attribute is used to change the scope of variables declared within
a procedure. Variable declared within a procedure without LOCAL and without
arguments are global in scope. When you declare a procedure with arguments
the default variable scope is local. So to make your variables local in
scope within a procedure without arguments you have to use the LOCAL
keyword.
Bruce
-----Original Message-----
From: Bob Helm [mailto:Bob.Helm@MEDIWARE.COM]
Sent: Friday, April 05, 2002 4:42 PM
To: SQR-USERS@list.iex.net
Subject: Re: Local Procedures
I think it should be:
begin-procedure NEWLY_HIRED LOCAL(:$NEWHIRE)
but don't hold me to it..
Hope it helps.
B
The Programmer formerly known as Bob
Mediware Information Systems Inc.
(913) 307-1045
Bob.Helm@Mediware.com
This message has been sent using 100% recycled electrons
-----Original Message-----
From: Ken Boettger [mailto:BoettgeK@CWU.EDU]
Sent: Friday, April 05, 2002 5:28 PM
To: SQR-USERS@list.iex.net
Subject: Local Procedures
When I add "LOCAL" to the following procedure I generate a "bad argument
list" error. When I remove LOCAL, everything works fine. What am I doing
wrong?
begin-procedure NEWLY_HIRED(:$NEWHIRE)
LET $NEWHIRE = 'Y'
end-procedure NEWLY_HIRED
The above works, what follows does not
begin-procedure NEWLY_HIRED(:$NEWHIRE) LOCAL
LET $NEWHIRE = 'Y'
end-procedure NEWLY_HIRED
The call is simply DO ($NEWHIRE).
-Ken