#ô > BLib.CmdLine 1.10 27Jul2009 #ô v1.10 Parses "quoted" options : (ô Command Line Parsing 2ô ~~~~~~~~~~~~~~~~~~~~ <: FFô FNcl() - parse command line for switches, options and parameters PFô ---------------------------------------------------------------- Z(ô FNcl("",0) - return next parameter d<ô FNcl(switch$,0) - return TRUE/FALSE if switch$ present n=ô FNcl(option$,1) - return option string if present or "" x: ‚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$ –Gç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$ ÒJl$=Á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$ ÿ