Subject: | |
From: | |
Reply To: | |
Date: | Sat, 5 Apr 1997 09:39:00 +0000 |
Content-Type: | Text/Plain |
Parts/Attachments: |
|
|
Mark Bixby Replied:
> Can anyone explain the use of "brackets" ([]) related to
> dereferencing variables in CI programs? They solve some problems
<<snip>>
More generally, you put brackets around CI expressions, not just variables.
<<snip>>
> Case in point - I defined a variable with a terminal control escape
> sequence to set "return = enter". When echoed to the terminal using
> explicit dereferencing (echo !varname), the variable was evaluated as
> if it were a numeric expression and gave a division by zero error.
> Placing the variable name in "brackets" (echo ![varname]) solves the
> dereferencing problem.
I'm having trouble imagining the difference here. What is the exact escape
sequence within !varname?
----------------------------Reply Separator--------------------------------
Mark,
The variable was originally defined as:
setvar esc, chr(27)
setvar nter, "!esc"+"&f1m149P<!154>"
However, the setvar statement was also returning a divide by zero
error. I suspect the "!" causes the evaluation problem.
I then changed the setvar to:
setvar nter, "!esc"+"&f1m149P<"+"!"+"154>"
This solved the setvar problem and the "brackets" solved the echo
problem.
Thanks for your clarification on the usage.
Steve Barrett
============================================================
= Steven P. Barrett [log in to unmask] =
= Systems Analyst =
= Fairfax County Public Library (703) 222-3132 - Voice =
= Technical Operations Center (703) 222-3135 - FAX =
= 4000 Stringfellow Rd. =
= Chantilly, VA 20151 =
= =
= --- The opinions expressed here are mine alone . --- =
============================================================
|
|
|