HP3000-L Archives

January 2002, Week 2

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:
Francois Desrochers <[log in to unmask]>
Reply To:
Francois Desrochers <[log in to unmask]>
Date:
Wed, 9 Jan 2002 09:47:30 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
Allen Porter asks:

> >OK, it seems that I knew the answer to this but it is not
> >coming to me....
> >The following fails because QEdit is not treating the ! as
> >the beginning of a variable.  What's the trick to do this?

The trick is to tell Qedit to pass the command to the CI first. The CI will
take care of variable substitution and return the modified command for Qedit
to act upon. How do you do this? Simply prefix the command with colon-slash
":/". For example,

/setvar mygroup "pub"
/setvar myacct "sys"
/t catalog.!mygroup.!myacct

Error:  Invalid filename. Group name must start with a letter.
/:/t catalog.!mygroup.!myacct
'Language' is now SPL
14072 lines in file

Steve Dirickson in a follow-up message correctly states that HPFOPEN can
handle variables in file designator. So why is the first command not
working? Because, for historical and compatibility reasons, Qedit still uses
FOPEN in a lot of places. FOPEN does not handle variable substitution.

The colon-slash trick works with any Qedit command that might require
variable substitution, not just file-related commands.

The workaround above should do what you need. If not, let us know. If you
think we should do away with such workarounds, we're open to arguments and
will be glad to enter an enhancement request for you.

Hope this helps.

Francois Desrochers
Robelle Solutions Technology Inc.
email: francois<dot>desrochers<at>robelle<dot>com

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

ATOM RSS1 RSS2