#ô > BLib.CmdLine 1.11 27Jul2009 #ô v1.10 Parses "quoted" options 7ô v1.11 -opt "quoted" doesn't return trailing quote (: 2ô Command Line Parsing <ô ~~~~~~~~~~~~~~~~~~~~ F: PFô FNcl() - parse command line for switches, options and parameters ZFô ---------------------------------------------------------------- d(ô FNcl("",0) - return next parameter n<ô FNcl(switch$,0) - return TRUE/FALSE if switch$ present x=ô FNcl(option$,1) - return option string if present or "" ‚: Œcݤcl(l$,n%):çl$="":A$=¤s(A$):ç—A$=34:A%=§A$+" "" ",""" ",2):l$=ÁA$,2,A%-2):A$=¤s(ÁA$,A%+1)):=l$ –<çl$="":A%=§A$+" "," "):l$=ÀA$,A%-1):A$=¤s(ÁA$,A%+1)):=l$  Kçn%=0:çl$<>"":A%=§A$,l$):çA%:A$=¤s(ÀA$,A%-1)+ÁA$,§A$," ",A%)+1))+" ":=¹ ªçn%=0:çl$<>"":=£ ´%A%=§À" ",—l$=32)+A$,l$):çA%=0:="" ¾'A$=ÀA$,A%-1)+¤s(ÁA$,§A$," ",A%)+1)) ÈCç—l$=32:l$=ÁA$,A%):A$=ÀA$,A%-1):=Ál$,1-(—l$=34),©l$+2*(—l$=34)) ÒPç—ÁA$,A%,1)<>34:l$=ÁA$,A%,§A$+" "," ",A%)-A%):A$=ÀA$,A%-1)+ÁA$,A%+©l$+1):=l$ ÜHl$=ÁA$,A%+1,§A$+" ",""" ",A%+1)-A%-1):A$=ÀA$,A%-1)+ÁA$,A%+©l$+3):=l$ æ/ݤs(A$):çÀA$,1)=" ":õA$=ÁA$,2):ýÀA$,1)<>" " ð+çÂA$,1)=" ":õA$=ÀA$,©A$-1):ýÂA$,1)<>" " ú=A$ : ÿ