HP3000-L Archives

July 2001, 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:
"Shahan, Ray" <[log in to unmask]>
Reply To:
Shahan, Ray
Date:
Tue, 3 Jul 2001 12:13:44 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (63 lines)
Patrick writes:

        Side note: personally I'd be nervous about enhancing BOUND to do
        wildcarding, and probably wouldn't use it if it was. You never know
when
        variables not in use today might be in use tomorrow, and break (or
at least
        confuse) your script because a wildcarded BOUND check found it. Hate
to say
        it but... it's BOUND to happen. :-)

This is actually my point.  I want to insure the integrity of the VARS I
intend to create/use, and if a VAR of the same name is already out there,
then either my CMD file aborted earlier, or some one else is using that VAR
name, and I don't want to step on that user's VAR. Thus, I should've added a
RETURN statement to the warning for the VAR already being created, but I was
just doing a quickie example...thanks.

> -----Original Message-----
> From: Patrick Santucci [SMTP:[log in to unmask]]
> Sent: Tuesday, July 03, 2001 11:20 AM
> To:   HP3000-L (E-mail)
> Cc:   'Ray Shahan'
> Subject:      RE: [HP3000-L] BOUND(?)
>
> Ron Horner notes:
>
> > BOUND() will only test for the existance of one var.  You may have to
> > do a showvar >tempfile and search the file.
>
> No search needed, because SHOWVAR *does* support wildcarding, which you
> probably already knew. So you could do:
>
> SETJCW CIERROR 0
> SHOWVAR FRUIT_@ >$NULL
> IF CIERROR = 8116
>   # "No match found for this variable set. (CIWARN 8116)"
>   SETVAR FRUIT_BASKET "var1"
>   SETVAR FRUIT_BASKET_OF_APPLES "var2"
>   SETVAR FRUIT_BASKET_OF_ORANGES "var3"
> ELSE
>   ECHO Conflicting CI var names will result, please verify any CI vars &
>        that are prefixed by FRUIT_
> ENDIF
>
> Side note: personally I'd be nervous about enhancing BOUND to do
> wildcarding, and probably wouldn't use it if it was. You never know when
> variables not in use today might be in use tomorrow, and break (or at
> least
> confuse) your script because a wildcarded BOUND check found it. Hate to
> say
> it but... it's BOUND to happen. :-)
>
> HTH,
> Patrick
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Patrick Santucci
> HPe3000 Systems Administrator
> Cornerstone Brands, Inc.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2