HP3000-L Archives

November 1997, 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:
Jeff Vance <[log in to unmask]>
Reply To:
Jeff Vance <[log in to unmask]>
Date:
Tue, 11 Nov 1997 09:19:27 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (21 lines)
On Nov 11, 11:04am, Wolfgang Kinscher wrote:
...
> input _l     <!_job
> if str(_l,1,1) = '!' then
>    setvar _l '!' + _l
> endif

This code doubles the ! if it is the 1st character in _l
You could also use the repl() function as:
   if lft(_l,1) = '!' then
      setvar _l repl(_l,'!','!!',1)
   endif

This is not "better", I just wanted to point out that repl() exists
and could be useful for doubling CI metacharacters in lines that
you may be echoing to a file.

Jeff Vance, CSY

--

ATOM RSS1 RSS2