HP3000-L Archives

September 2001, 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:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Wed, 26 Sep 2001 16:27:48 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
> SETVAR _CN ' '
> WHILE NOT NUMERIC ("!_CN") OR NOT LEN ("!_CN") = 10
>   INPUT _CN;PROMPT="Paste or type 10-digit Customer Number
> here:";READCNT=10
>   if not numeric ( "!_CN" ) or not len ( "!_CN" ) = 10
>     echo Wrongo try again
>   ENDIF
> endif

A slight variation on the above perfectly valid scheme:

 setvar num ""
 while len(setvar(num,input("Paste or type...",,10))) <> 10 or &
       not numeric(num)
 endwhile
 # now we have a 10 digit string in the 'num' variable ...


FWIW,
 Jeff Vance, CSY

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

ATOM RSS1 RSS2