HP3000-L Archives

September 2000, Week 4

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:
Paul H Christidis <[log in to unmask]>
Reply To:
Paul H Christidis <[log in to unmask]>
Date:
Tue, 26 Sep 2000 15:22:51 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
While Barry's suggestion is very compact and straight forward, it also
requires a minimum OS release of 5.5 pp7 (I think) since 'word' is a
relatively 'new' CI evaluator function.  The following works using 'older'
functions:

setvar tempvar "[log in to unmask]"
setvar p1 pos(".",tempvar,1)
setvar p2 pos(".",tempvar,2)
setvar tempvar1 lft(tempvar,p1 - 1)
setvar tempvar2 str(tempvar,p1+1,p2-p1-1)
setvar tempvar3 rht(tempvar,-(p2+1))
showvar temp@
TEMPVAR = [log in to unmask]
TEMPVAR1 = AI@J
TEMPVAR2 = GROUP1
TEMPVAR3 = ACCOUNT1

Regards
Paul Christidis






At 5:08 PM -0400 9/26/00, [log in to unmask] wrote:
>1. TEMPVAR = "[log in to unmask]"
...
>
>How do I break this up into 3 different variable TEMPVAR1, TEMPVAR2,
>TEMPVAR3 such that the results should be as follows:
>
>1. TEMPVAR1 = "AI@J", TEMPVAR2 = "GROUP1", TEMPVAR3 = "ACCOUNT1"
...
>
>Is there any option other than involving a WHILE loop with continious read
>till I reach "." in each attempt and process it accordingly. Any better,
>fast and best ideas ? Thanks in advance.

How about

  :setvar tempvar "[log in to unmask]"
  :setvar tempvar1 word(tempvar,'.',1)
  :setvar tempvar2 word(tempvar,'.',2)
  :setvar tempvar3 word(tempvar,'.',3)
  :showvar temp@
  TEMPVAR = [log in to unmask]
  TEMPVAR1 = AI@J
  TEMPVAR2 = GROUP1
  TEMPVAR3 = ACCOUNT1
  :



Barry Lake                              [log in to unmask]
Allegro Consultants, Inc.               www.allegro.bogus.com
(408)252-2330
--------
Attempting to use anti-spam technique.
Remove ".bogus" to create valid address.

ATOM RSS1 RSS2