HP3000-L Archives

January 1999, Week 3

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:
Patrick Santucci <[log in to unmask]>
Reply To:
Patrick Santucci <[log in to unmask]>
Date:
Fri, 15 Jan 1999 12:18:59 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
Michael D. Hensley wrote:

<multilevel nested logon udc snipped>

> Hmmmmm, let's see if we can't simplify that:
>
> IF HPACCOUNT="SYS"
>    SETVAR HPPROMPT "Test-MO"+":"
> ELSE
>    IF POS(HPACCOUNT,"FIRST,LNL,FPA,LNP") <> 0
>       SETVAR HPPROMPT "Test"+HPACCOUNT+":"
>    ELSE
>       SETVAR HPPROMPT ":"
>    ENDIF
> ENDIF

Well done, sir! I was going to suggest he replace the nested "ELSE, IF"
statements with "ELSEIF" and lose nearly all the "ENDIF"s at the end,
but your solution is more economical, not to mention elegant. :-)

Patrick
--
Patrick Santucci
Technical Services Analyst
KVI, a division of Seabury & Smith, Inc.
Visit our site! http://www.kvi-ins.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"If they try to rush me, I always say, 'I've only got
one other speed -- and it's slower.'"    ~ Glenn Ford

ATOM RSS1 RSS2