HP3000-L Archives

November 1996, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Vance <[log in to unmask]>
Reply To:
Jeff Vance <[log in to unmask]>
Date:
Wed, 6 Nov 1996 12:19:00 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
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

--

ATOM RSS1 RSS2