Subject: | |
From: | |
Reply To: | |
Date: | Wed, 6 Nov 1996 12:19:00 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Nov 6, 11:40am, Ken Sletten B894 C312 x62525 wrote:
> Subject: Re: System Variables
> Ongoing discussion: snip...
> >... do you see value in "script-local' vars, meaning they are local
> >to a script and are automatically deleted when the script exits? ....
>
> But can't we take care of this already with DELETEVAR ??
> ... Not that I'm against shortcuts; but unless I'm missing
> something ...
Yes, and most well written scripts cleanup after themselves. However,
some scripts don't and more importantly there are times when you can't,
e.g. <break> hit in the middle of your script, or the process of the
user running your script aborts, etc.
But this is not the main benefit of script-local vars, IMHO. I see
the main benefits: 1) being able to re-scope predefined HP vars, like
DSLINE or HPMSGFENCE, 2) having assurance that the local vars your
script is using do not conflict (meaning overwrite) with other local vars
or job/session vars of the same name, e.g. the ubiquitous var I.
Jeff Vance, CSY
--
|
|
|