Category : BASIC Source Code
Archive   : WDMQ0110.ZIP
Filename : PARSECMD.BAS

 
Output of file : PARSECMD.BAS contained in archive : WDMQ0110.ZIP
DATA " Sample Program V1.0"
DATA " Copyright 1988 (c) Wayne D. Mingee All rights reserved"
DATA
DATA " Format: PARSECMD parameters"
DATA " "
DATA " Display each parameter"
DATA " Those beginning with 'e' will be flagged as an error",

DEFINT A-Z
CONST True = -1, false = 0
Swchar$ = "/"
Pcnt = 2
Program$ = "PARSECMD"

DO
CALL ParseCmd(Program$, Parm$, Swchar$, Errsw, Pcnt, Tdisplay)
IF Errsw = -1 THEN EXIT DO
' Since QB forces thecommand line to upper case and the
' data from the environment and parm file are not make
' sure everything is.
A$ = UCASE$(Parm$)

IF Errsw = -2 THEN PRINT "Quoted ";
IF Pcnt = 1 THEN
PRINT "Non-sw parameter 1>";a$;"<"
ELSEIF Pcnt = 2 THEN
PRINT "Non-sw parameter 2>";a$;"<"
ELSE
K$ = LEFT$(A$, 1)
A$ = RTRIM$(MID$(A$, 2))
PRINT "Switch '";K$;"' parameter>";a$;"<"
IF K$ = "X" THEN
Tdisplay = NOT Tdisplay
END IF
END IF
IF LEFT$(A$, 1) = "E" THEN
Errsw = True
END IF
LOOP
Xit:
END



  3 Responses to “Category : BASIC Source Code
Archive   : WDMQ0110.ZIP
Filename : PARSECMD.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/