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 │
- └────────────────────────────────────────────────────────────────────┘
- v1.0 xCommand.TST test of Startup & Parameter parsing Library.
- > xCommand( var Parms : buffer );
- ; fetches the parameters used in the start keyin for the COM file.
- This must be executed before any other statement in the program!
-
- > xCmdParse( CmdParm : buffer ; Command Line input.
- var CmdList : longwordlist; array of parameters output.
- var TotalParms : Integer ); number of parameters output.
-
- ; Parses command line and returns an array containing all parms.
- }
-
- type Buffer = string[ 255 ];
- LongWord = string[ 20 ];
- Word = string[ 10 ];
- LongWordList = array[ 1..16 ] of LongWord ;
- WordList = array[ 1..16 ] of Word ;
-
- var CmdParmsBfr : Buffer ;
- CmdParmList : LongWordList;
- LongWordvar : LongWord ;
- Counter, ParmCOunt : Integer ;
-
- {$I xCommand.lib }
-
- begin
- FILLCHAR( CMDPARMSBFR,255,0); Parmcount := 0;
- FILLCHAR( CMDPARMLIST,320,0); Counter := 0;
- GoToXY( 1,10 );
- writeln('Test of xCommand.LIB v2.3');
- xCommand( CmdParmsBfr );
- writeln( Length(CmdParmsBfr):3,' |',CmdParmsBfr,'|' );
-
- xCmdParse( CmdParmsBfr, CmdParmList, ParmCount );
-
- For Counter := 1 to ParmCount do begin
- LongWordVar := CmdParmList[ Counter ];
- writeln( Length( LongWordVar):3, ' |',LongWordVar,'|' );
- end{ For Counter }
- end.