TIP: Click on subject to list as thread! ANSI
echo: batpower
to: Paul Quinn
from: Richard Webb
date: 2010-01-21 06:51:14
subject: limiting scope of acceptable command line parm

HI Paul,

On Thu 2038-Jan-21 14:45, Paul Quinn (3:640/384) wrote to Richard Webb:

PQ> On 21 Jan 10 01:44, you wrote to all:

 RW> Is there any way that you gurus know of to limit the scope
 RW> of acceptable parameters such as is provided in dbase?

PQ> Ooh, another dBASE fan!  (I used it recently... ermm, nearly 4 years
PQ> ago... to 'join' two tables together when I created the basis for a
PQ> JamNNTPd "groups" file. :-)

Yah bummer, I lost Dbase IV and III both in the hurricane
and the aftermath fire, didn't yet have it on this machine,
which had been midi automation driver until I took it to
University hospital New ORleans to be ham station logger
temporarily.  I'd never had a need for dBase on it, so
hadn't done it yet >  Wish I had.
Wish I knew a place I could get it either as a zip archive
or even on floppies .
NO cd drive in this puppy.


 RW> I.e. the command line parm given must be numeric or the program
 RW> branches to a block of code that generates an appropriate message then
 RW> ends?
 RW> Just curious.

PQ> Mmm.  You still have that NLSS.bat and the required utils?  I used a
PQ> thingy called 'IFNUMBER" to do range checking on command-line
PQ> input... 

THere we go!!! WE're usually talking about single digit
numbers, so we're not talking a whole lot of parsing to do.

PQ> -----88-----
PQ>   :: Test the elements for reasonableness...
PQ>     :: Zones #s between 1-5, thanks...
PQ>     IFNUMBER %ZONE% smallerthan 1
PQ>       IF ERRORLEVEL 1 GOTO ERRMSG_2
PQ>     IFNUMBER %ZONE% biggerthan 5
PQ>       IF ERRORLEVEL 1 GOTO ERRMSG_2

PQ>     :: Net/Region #s between 1-7211, only...
PQ>     IFNUMBER %NETREGON% smallerthan 1

PQ> Is that what you had in mind, mate?

Maybe, but what happens to ifnumber I wonder if the bonehead that invokes
it types something which is an alpha string as
the command line parm?  Have to try that and see what kind
of choke we get.
ONce I know how it chokes, I"m golden.
Could be kludged to force what I want I think.  with dBase
it was always the "picture" statement in a program which
forced the user to provide an acceptable string for input,
so that one could write programs allowing the minimally
trained to interact with dBase.  i.e.
getvalue picture 1234567890
or something like that.  Been so long since I actually did
any program writing for dBase as I mostly used it from the
dot prompt, believe it or not .


Regards,
           Richard
--- timEd 1.10.y2k+
* Origin: Radio REscue net operations BBS (1:116/901)
SEEN-BY: 10/1 11/200 331 34/999 120/228 123/500 128/2 187 140/1 222/2 226/0
SEEN-BY: 236/150 249/303 250/306 261/20 38 100 1381 1404 1406 1410 1418
SEEN-BY: 266/1413 280/1027 320/119 393/68 396/45 633/104 260 267 285 640/954
SEEN-BY: 690/682 734 712/0 313 848 800/432 801/161 189 2222/700 2320/100 105
SEEN-BY: 2320/200 5030/1256
@PATH: 116/901 3634/12 123/500 261/38 633/260 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.