HP3000-L Archives

April 1997, 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:
Mon, 7 Apr 1997 09:08:01 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
On Apr 5,  9:39am, Steve BARRETT wrote:
> Subject: Re: CI Variable Names & Brackets
...
> The variable was originally defined as:
>
>     setvar esc, chr(27)
>     setvar nter, "!esc"+"&f1m149P<!154>"

:setvar nter, "!esc""+"&f1m149P<!154>"
                                ^
Invalid numeric index into the redo stack. (CIWARN 8164)

This warning is because !nnn is treated as referencing command number
nnn from the CI's redo stack.  If command # 154 exists, the entire command
line will be substituted in place of the "!154".

If "!154" needs to be part of the variable's value then use "!!154" instead.

Another concern is that the "<" and ">" can be treated as I/O redirection,
but in this case the quotes prevents that from happening.  If you
want a ">" or a "<" to be treated literally by the CI you can escape the
character with a "!", eg. "!>" or "!<".

> However, the setvar statement was also returning a divide by zero
> error.  I suspect the "!" causes the evaluation problem.

My guess is that it has something to do with command line #154.

> I then changed the setvar to:
>
>     setvar nter, "!esc"+"&f1m149P<"+"!"+"154>"
>
> This solved the setvar problem and the "brackets" solved the echo
> problem.

Clever solution!  If you need to echo this whole string you can do it in one
line:
   :echo ![chr(27)+"&f1m149P<!!154>"]

Here you see an expression inside the ![]

regards,
Jeff Vance, CSY

--

ATOM RSS1 RSS2