home *** CD-ROM | disk | FTP | other *** search
- { ╔═══╦══════════════════════════════════════════════╦═══╗
- ║ ║ Pascal Library by Scott Wade ║ ║
- ║ ║ 715 FM 1959 Apt 310 ║ ║
- ║ ║ Houston, TX 77034 ║ ║
- ┌──────╨───╨──────────────────────────────────────────────╨───╨──────┐
- │ This group of routines is contributed to public domain, and no │
- │ one can possibly get any commercial value out of them since they │
- │ must be used in other programs. I require that if these are used │
- │ as is in any program, that this banner remain with the source │
- │ code of the program. I would appreciate any comments or sugges- │
- │ tions on improvements, & am curious to hear how these are used. │
- │ You can leave a message for me on these BBS's: │
- │ Ziggy's 821-1391 ScoreBoard 583-7848 │
- │ TBL-COMM 661-9040 Test-Mode 660-9252 │
- └────────────────────────────────────────────────────────────────────┘
-
- TOPTION.LIB v1.0 Command option parser.
- v1.0: 4/11/86 : Given a buffer, this will extract a one-letter option that
- is preceded by /. For example:
- JOBRUN /f filename.ext
- will return 70, the ascii equivalent of 'F', and the buffer will be
- ' filename.ext' NOTE: it converts to uppercase! }
-
- procedure tOption( var BufLine : Buffer ; var AscInt : Integer );
- var
- LenOpt : Byte Absolute BufLine;
- PosOpt, DelChar : Integer;
- OptChar : Char ;
- begin
- If LenOpt > 1 then begin
- PosOpt := Pos( '/', BufLine );
- If (PosOpt > 0) AND ( PosOpt < ( LenOpt )) then begin
- AscInt := Ord( UpCase( Copy( BufLine, PosOpt +1,1)));
- Delete( BufLine, PosOpt, 2 );
- end{ If / and anything after it };
- end{ If long enuf to have options };
- end;
- { end TOPTION.LIB
- *****************************************************************************}