HP3000-L Archives

January 1999, Week 3

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:
"Genute, Thomas" <[log in to unmask]>
Reply To:
Genute, Thomas
Date:
Mon, 18 Jan 1999 13:49:59 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (56 lines)
John,
Please note that the "echo this is !x"  in your user command did not show
the up-shifted value, but displayed "this is test".  Although you have
successfully set a variable "x" to the upshifted value of the parm, "!x" is
will display and evaluate the value of the original "parm" not the value of
the variable.  Using "!x" in an expression will not evaluate to the
up-shifted value.  You must therefore use a name for the variable name other
than the name of the parm.  A way around this is to use the variable "x"
without the exclamation point.  For example  ECHO ![x]  will display the
upshifted value, i.e., the value of the variable rather than the value of
the parm.


Tom Genute


                -----Original Message-----
                From:   John Dunlop [mailto:[log in to unmask]]
                Sent:   Monday, January 18, 1999 9:23 AM
                To:     [log in to unmask]
                Subject:        Re: UPSHIFT a PARM

                "Genute, Thomas" wrote:
                >
                > You can upshift a parm but must use a different variable
name within the
                > command file or UDC.
                >
                > PARM INPUT="string"
                > Setvar UINPUT UPS("!INPUT")
                > Echo INPUT=!INPUT
                > Echo UINPUT=!UINPUT

                I don't mean to nit-pick but I have often retained the same
name for
                the UDC parm as the variable I have created.

                E.g.
                parm x="test"
                setvar x ups("!x")
                echo this is !x
                showvar x

                will produce the result:

                this is test
                X = TEST

                Cheers,

                John Dunlop

                E-mail : [log in to unmask]
                Web  : http://homepages.tcp.co.uk/~jdunlop/
                "All your HP3000 resources on the Net"

ATOM RSS1 RSS2