//------------------------------------------------------------------------------ // This procedure file is packaged by igmodule // Thu,15 Dec 2016 //------------------------------------------------------------------------------ #pragma ModuleName=CommandPanel //------------------------------------------------------------------------------ // original file: CommandPanel_Main.ipf //------------------------------------------------------------------------------ #if !ItemsInList(WinList("CommandPanel_Main.ipf",";","")) //#include ":CommandPanel_Menu" //#include ":CommandPanel_Interface" //#include ":CommandPanel_Complete" //#include ":CommandPanel_Execute" //#include ":CommandPanel_Expand" #endif //------------------------------------------------------------------------------ // original file: CommandPanel_Menu.ipf //------------------------------------------------------------------------------ #if !ItemsInList(WinList("CommandPanel_Menu.ipf",";","")) //#pragma ModuleName=CommandPanel_Menu //#include ":CommandPanel_Interface" override strconstant CommandPanel_Menu = "CommandPanel" Menu StringFromList(0,CommandPanel_Menu), dynamic RemoveListItem(0,CommandPanel_Menu) "New Command Panel",/Q,CommandPanel#CommandPanel_New() CommandPanel#MenuItem(0), /Q, CommandPanel#MenuCommand(0) CommandPanel#MenuItem(1), /Q, CommandPanel#MenuCommand(1) CommandPanel#MenuItem(2), /Q, CommandPanel#MenuCommand(2) CommandPanel#MenuItem(3), /Q, CommandPanel#MenuCommand(3) CommandPanel#MenuItem(4), /Q, CommandPanel#MenuCommand(4) CommandPanel#MenuItem(5), /Q, CommandPanel#MenuCommand(5) CommandPanel#MenuItem(6), /Q, CommandPanel#MenuCommand(6) CommandPanel#MenuItem(7), /Q, CommandPanel#MenuCommand(7) CommandPanel#MenuItem(8), /Q, CommandPanel#MenuCommand(8) CommandPanel#MenuItem(9), /Q, CommandPanel#MenuCommand(9) CommandPanel#MenuItem(10), /Q, CommandPanel#MenuCommand(10) CommandPanel#MenuItem(11), /Q, CommandPanel#MenuCommand(11) CommandPanel#MenuItem(12), /Q, CommandPanel#MenuCommand(12) CommandPanel#MenuItem(13), /Q, CommandPanel#MenuCommand(13) CommandPanel#MenuItem(14), /Q, CommandPanel#MenuCommand(14) CommandPanel#MenuItem(15), /Q, CommandPanel#MenuCommand(15) CommandPanel#MenuItem(16), /Q, CommandPanel#MenuCommand(16) CommandPanel#MenuItem(17), /Q, CommandPanel#MenuCommand(17) CommandPanel#MenuItem(18), /Q, CommandPanel#MenuCommand(18) CommandPanel#MenuItem(19), /Q, CommandPanel#MenuCommand(19) End static Function/S MenuItem(i) Variable i String win=StringFromList(i,WinList("CommandPanel*",";","WIN:64")) GetWindow/Z $win,wtitle return SelectString(strlen(win),"","\M0"+win+" ("+S_Value+")") End static Function MenuCommand(i) Variable i DoWindow/F $StringFromList(i,WinList("CommandPanel*",";","WIN:64")) End #endif //------------------------------------------------------------------------------ // original file: CommandPanel_Interface.ipf //------------------------------------------------------------------------------ #if !ItemsInList(WinList("CommandPanel_Interface.ipf",";","")) //#pragma ModuleName=CommandPanel_Interface //#include ":CommandPanel_Complete" //#include ":CommandPanel_Execute" //#include ":CommandPanel_Expand" //#include "Writer" ///////////////////////////////////////////////////////////////////////////////// // Options ////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// override strconstant CommandPanel_Font = "" override constant CommandPanel_Fontsize = 14 override constant CommandPanel_WinHeight = 300 override constant CommandPanel_WinWidth = 300 override strconstant CommandPanel_WinTitle = "'['+IgorInfo(1)+'] '+GetDataFolder(1)" override constant CommandPanel_KeySwap = 0 ///////////////////////////////////////////////////////////////////////////////// // Public Functions ///////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// override Function CommandPanel_New() MakePanel() End override Function/S CommandPanel_GetLine() return GetStr("CommandLine") End override Function CommandPanel_SetLine(str) String str SetStr("CommandLine",str) SetVar("LineChanged",1) End override Function/WAVE CommandPanel_GetBuffer() Duplicate/FREE/T GetTextWave("buffer") w w = ReplaceString("\\\\", w, "\\") return w End override Function CommandPanel_SetBuffer(w [word, line, buffer]) WAVE/T w, word, line, buffer if(WaveExists(w)) SetTextWave("line", w) SetTextWave("word", w) Make/FREE/T/N=(DimSize(w, 0)) w_buf = ReplaceString("\\", w, "\\\\") SetTextWave("buffer", w_buf) endif if(!ParamIsDefault(word)) SetTextWave("word", word) endif if(!ParamIsDefault(line)) SetTextWave("line", line) endif if(!ParamIsDefault(buffer)) buffer = ReplaceString("\\", buffer, "\\\\") SetTextWave("buffer", buffer) endif CommandPanel_SelectRow(0) SetVar("BufferChanged", 1) End override Function CommandPanel_SelectedRow() Variable n String win = StringFromList(0, WinList("CommandPanel*",";","WIN:64")) if(strlen(win)) ControlInfo/W=$win CPBuffer return V_Value endif End override Function CommandPanel_SelectRow(n) Variable n String win = StringFromList(0, WinList("CommandPanel*",";","WIN:64")) if(strlen(win)) ListBox CPBuffer, win=$win, row=n, selrow=n endif End ///////////////////////////////////////////////////////////////////////////////// // Panel Function /////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// static Function MakePanel() Variable width = CommandPanel_WinWidth Variable height = CommandPanel_WinHeight NewPanel/K=1/W=(0, 0, width, height)/N = CommandPanel String win = S_Name // Title DoWindow/T $win, WinTitle() // Window hook SetWindow $win, hook(base) = CommandPanel#WinProc // Controls & their values GetStr("CommandLine") GetTextWave("buffer") SetVariable CPLine, title = " ", value = $PackageFolderPath()+"S_CommandLine" ListBox CPBuffer, mode = 2, listWave = $PackageFolderPath()+"W_buffer" ResizeControls(win) // Control actions SetVariable CPLine, proc=CommandPanel#LineAction ListBox CPBuffer, proc=CommandPanel#BufferAction // Font String font if(FindListItem(CommandPanel_Font,FontList(";")) >= 0) font = CommandPanel_Font else font = GetDefaultFont("") endif Execute "SetVariable CPLine, font =$\"" + font + "\"" Execute "ListBox CPBuffer, font =$\"" + font + "\"" SetVariable CPLine, fSize = CommandPanel_FontSize ListBox CPBuffer, fSize = CommandPanel_FontSize // Activate Execute/P/Q "SetVariable CPLine, activate" End // WinTitle static Function/S WinTitle() NewDataFolder/O root:Packages NewDataFolder/O root:Packages:CommandPanel String expr = CommandPanel#gsub(CommandPanel_WinTitle,"\\\\|\\\'|\'","",proc=WinTitleSpecialChar) Execute "String/G root:Packages:CommandPanel:S_Title = " + expr SVAR s = root:Packages:CommandPanel:S_Title return s End static Function/S WinTitleSpecialChar(s) String s StrSwitch(s) case "\\\\": return s case "\\\'": return "\'" case "\'": return "\"" default: return s EndSwitch End // Resize static Function ResizeControls(win) String win GetWindow $win, wsizeDC Variable width=V_Right-V_Left, height=V_Bottom-V_Top ControlInfo/W=$win CPLine Variable height_in=V_height, height_out=height-height_in SetVariable CPLine, win=$win, pos={0, 0}, size={width, height_in} ListBox CPBuffer, win=$win, pos={0, height_in}, size={width, height_out} End //////////////////////////////////////////////////////////////////////////////// // Window hook & control actions /////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // Window hook static Function WinProc(s) STRUCT WMWinHookStruct &s if( s.eventCode == 0 || s.eventCode == 6 ) // activate & resize ResizeControls(s.winName) endif End // Control actions static Function LineAction(line) STRUCT WMSetVariableAction &line DoWindow/T $line.win, WinTitle() if(line.eventCode == 2) // key input Variable key = line.eventMod if(CommandPanel_KeySwap) key = (key == 0) ? 2 : ( key == 2 ) ? 0 : key endif switch(key) case 0: // Enter CommandPanel#ExecuteLine() //DoWindow/F $line.win break case 2: // Shift + Enter CommandPanel#Complete() break case 4: // Alt + Enter CommandPanel#AltComplete() break endswitch endif if(IgorVersion()<7) SetVariable CPLine, win=$line.win, activate endif End static Function BufferAction(buffer) STRUCT WMListboxAction &buffer if(buffer.eventCode == 3) // double click CommandPanel_SetLine(CommandPanel_GetLine() + buffer.listWave[buffer.row]) endif if(buffer.eventCode > 0) // except for closing DoWindow/T $buffer.win, WinTitle() SetVariable CPLine, win=$buffer.win, activate endif End //////////////////////////////////////////////////////////////////////////////// // Accessor for package parameters ///////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// static Function/S PackageFolderPath() NewDataFolder/O root:Packages NewDataFolder/O root:Packages:CommandPanel return "root:Packages:CommandPanel:" End static Function/WAVE GetTextWave(name) String name String path = PackageFolderPath() + "W_" + name WAVE/T w = $path if( !WaveExists(w) ) Make/O/T/N=0 $path/WAVE=w endif return w End static Function SetTextWave(name,w) String name; WAVE/T w String path = PackageFolderPath() + "W_" + name if( !WaveRefsEqual(w, $path) ) Duplicate/T/O w $path endif End static Function GetVar(name) String name String path = PackageFolderPath() + "V_" + name NVAR v = $path if( !NVAR_Exists(v) ) Variable/G $path NVAR v = $path endif return v End static Function SetVar(name, v) String name; Variable v String path = PackageFolderPath() + "V_" + name NVAR target = $path if( !NVAR_Exists(target) ) Variable/G $path NVAR target = $path endif target = v End static Function/S GetStr(name) String name String path = PackageFolderPath() + "S_" + name SVAR s = $path if( !SVAR_Exists(s) ) String/G $path SVAR s = $path endif return s End static Function SetStr(name, s) String name, s String path = PackageFolderPath() + "S_" + name SVAR target = $path if( !SVAR_Exists(target) ) String/G $path SVAR target = $path endif target = s End #endif //------------------------------------------------------------------------------ // original file: CommandPanel_Complete.ipf //------------------------------------------------------------------------------ #if !ItemsInList(WinList("CommandPanel_Complete.ipf",";","")) //#include ":CommandPanel_Interface" //#include ":CommandPanel_Expand" //#pragma ModuleName=CommandPanel_Complete override constant CommandPanel_IgnoreCase = 1 static Function Complete() String input = CommandPanel_GetLine(), selrow="" WAVE/T line = CommandPanel#GetTextWave("line") if(DimSize(line, 0) > 0) selrow = line[CommandPanel_SelectedRow()] endif if(cmpstr(input, selrow, 1) == 0) // same as the selected buffer row ScrollBuffer(1) elseif(strlen(input) == 0) // empty string ScrollBuffer(0) elseif(GrepString(input, "^ ")) // beginning with whitespace FilterBuffer() elseif(GrepString(input, "^(\\\\\\\\|\\\\\\\"|[^\"])*(\"(?1)*\"(?1)*)*\"(?1)*$")) // string literal // do nothing elseif(GrepString(input, "((? 0) String patterns = RemoveFromList("", CommandPanel_GetLine(), " ") Variable i, N=ItemsInList(patterns, " ") for(i = 0; i < N; i += 1) String pattern = StringFromList(i, patterns, " ") if(CommandPanel_IgnoreCase) pattern="(?i)" + pattern endif Extract/FREE/T buf, buf, GrepString(word, pattern) Extract/FREE/T line, line, GrepString(word, pattern) Extract/FREE/T word, word, GrepString(word, pattern) endfor CommandPanel_SetBuffer($"", buffer = buf, line = line, word = word) if(DimSize(buf, 0) > 0) CommandPanel_SetLine(line[0]) endif endif End // for a pathname static Function CompletePathname() String line=CommandPanel_GetLine(), cmd, path, name, s SplitString/E="^(.*?)(((? {"1", "23", "456"}. static Function/WAVE SplitAs(s,w) String s; WAVE/T w Variable i, j, N = DimSize(w, 0) Make/FREE/T/N=(N) buf for(i = 0, j = 0; i < N; j += strlen(w[i]), i += 1) buf[i] = s[j, j+strlen(w[i])-1] endfor return buf End // Alias of SplitAs(s, CommandPanel#partition(mask(s), expr)) static Function/WAVE PartitionWithMask(s,expr) String s,expr return SplitAs(s, CommandPanel#partition(mask(s), expr)) End // Remove " " // This is used to write regular expressions clearly static Function/S trim(s) String s return ReplaceString(" ",s,"") End // w1 = {"a", "b"}, w2 = {"1", "2"} -> {"a1", "a2", "b1", "b2"} static Function/WAVE product(w1,w2) WAVE/T w1,w2 Variable n1 = DimSize(w1, 0), n2 = DimSize(w2, 0) if(n1 * n2) Make/FREE/T/N=(n1*n2) w = w1[floor(p / n2)] + w2[mod(p, n2)] else Make/FREE/T/N=0 w endif return w End //////////////////////////////////////////////////////////////////////////////// // 0. Escape Sequence ////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// static strconstant M ="|" // a meaningless character for masking static Function/S Mask(s) String s // mask comment s = CommandPanel#gsub(s, "//.*$", "", proc = Mask_) // mask `.*` s = CommandPanel#gsub(s, "\\\\\\\\|\\\\`|`(\\\\\\\\|\\\\`|[^\\`])*`","",proc = Mask_) // mask ".*" s = CommandPanel#gsub(s, "\\\\\\\\|\\\\\"|\"(\\\\\\\\|\\\\\"|[^\\\"])*\"","",proc = Mask_) // mask \. s = CommandPanel#gsub(s, "\\\\\\\\|\\\\{|\\\\}|\\\\,","",proc = Mask_) return s End static Function/S Mask_(s) String s Variable i; String buf="" for(i = 0; i < strlen(s); i += 1) buf += M endfor return buf End // Unescape static Function/S UnescapeBraces(s) String s String ignore = "//.*$|\\\\\\\\|\\\\`|`(\\\\\\\\|\\\\`|[^\\`])*`|\\\\\"|\"(\\\\\\\\|\\\\\"|[^\\\"])*\"" String pattern = "\\\\{|\\\\}\\\\," return CommandPanel#gsub(s ,ignore+"|"+pattern, "", proc = UnescapeBrace) End static Function/S UnescapeBrace(s) String s return SelectString(GrepString(s, "^\\\\[^\\\\`]$"), s, s[1]) End static Function/S UnescapeBackquotes(input) String input return CommandPanel#gsub(input, "//.*$|\\\\\\\\|\\\\`|`", "", proc = UnescapeBackquote) End static Function/S UnescapeBackquote(s) String s return SelectString(StringMatch(s,"`"),s,"") End // 1, 5. Line Split static Function/WAVE LineSplitBy(delim, input, masked) String delim, input ,masked Variable pos = strsearch(masked, delim, 0) if(pos < 0) return CommandPanel#cast({input}) endif Variable pos2 = pos + strlen(delim) return CommandPanel#cons(input[0, pos-1], LineSplitBy(delim, input[pos2, inf], masked[pos2, inf])) End static Function/WAVE StrongLineSplit(input) String input return LineSplitBy(";;", input, mask(input)) End static Function/WAVE WeakLineSplit(input) String input return LineSplitBy(";", input, mask(input)) End // 2. Alias Expansion static Function/S ExpandAlias(input) String input WAVE/T w=PartitionWithMask(input,";")// line, ;, lines if(strlen(w[1])==0) return ExpandAlias_(input) endif return ExpandAlias_(w[0]+w[1]) + ExpandAlias(w[2]) End static Function/S ExpandAlias_(input) // one line String input WAVE/T w=CommandPanel#partition(input,"^\\s*(\\w*)") //space,alias,args if(strlen(w[1])==0) return input endif Duplicate/FREE/T GetAlias(),als Extract/FREE/T als,als,StringMatch(als,w[1]+"=*") if(CommandPanel#null(als)) return input else String cmd=(CommandPanel#head(als))[strlen(w[1])+1,inf] return w[0]+ExpandAlias_(cmd)+w[2] endif End static Function SetAlias(input) String input WAVE/T w=PartitionWithMask(input,"^(\\s*\\w+\\s*=\\s*)") //blank,alias=,string if(strlen(w[1])) Duplicate/T/FREE GetAlias() alias Extract/FREE/T alias,alias,!StringMatch(alias,trim(w[1])+"*") InsertPoints 0,1,alias; alias[0] = trim(w[1])+w[2] CommandPanel#SetTextWave("alias",alias) endif End static Function/WAVE GetAlias() return CommandPanel#GetTextWave("alias") End static Function/WAVE GetAliasNames() return CommandPanel#map(GetAliasName,GetAlias()) End static Function/S GetAliasName(s) String s String name SplitString/E="^(\\w+)=" s,name return name End // 3. Brace Expansion static Function/WAVE ExpandBrace(input) String input return ExpandSeries(ExpandCharacterSeries(ExpandNumberSeries(input))) End static Function/WAVE ExpandSeries(input) String input WAVE/T w=SplitAs(input,CommandPanel#partition(mask(input),trim("( { ([^{}] | {[^{}]*} | (?1))* , (?2)* } )"))) if(strlen(w[1])==0) return CommandPanel#cast({input}) endif WAVE/T body = ExpandSeries_((w[1])[1,strlen(w[1])-2]) body = w[0] + body + w[2] return CommandPanel#concatMap(ExpandSeries,body) End static Function/WAVE ExpandSeries_(body) // expand inside of {} once String body if(strlen(body)==0) return CommandPanel#cast({""}) elseif(StringMatch(body[0],",")) return CommandPanel#cons("",ExpandSeries_(body[1,inf])) elseif(!GrepString(body,"{|}|\\\\")) Variable size = ItemsInList(body, ",") + StringMatch(body[strlen(body)-1], ",") Make/FREE/T/N=(size) w = StringFromList(p, body, ",") return w endif WAVE/T w=PartitionWithMask(body,trim("^( ( [^{},] | ( { ([^{}]*|(?3)) } ) )* )")) if(strlen(w[2])) return CommandPanel#cons(w[1],ExpandSeries_( (w[2])[1,inf] )) else return CommandPanel#cast({w[1]}) endif End static Function/S ExpandNumberSeries(input) String input WAVE/T w=CommandPanel#partition(input,trim("( { ([+-]?\\d+) \.\. (?2) (\.\. (?2))? } )")) if(strlen(w[1])==0) return input endif String fst,lst,stp; SplitString/E="{([+-]?\\d+)\.\.((?1))(\.\.((?1)))?}" w[1],fst,lst,stp,stp Variable v1=Str2Num(fst), v2=Str2Num(lst), vd = abs(Str2Num(stp)); vd = NumType(vd) || vd==0 ? 1 : vd Variable i,N=floor(abs(v1-v2)/vd+1); String s="" for(i=0;i {fld1:, fld2:} WAVE/T w = Folders(path) Extract/T/FREE w,fld,PathMatch(w,RemoveEnding(CommandPanel#head(token),":")) fld=path+fld+":" return fld else // * -> {wave, var, str, fld} WAVE/T w = Objects(path) Extract/T/FREE w,obj,PathMatch(w,RemoveEnding(CommandPanel#head(token),":")) obj=path+obj return obj endif else if(cmpstr(CommandPanel#head(token),"**:")==0) WAVE/T fld = GlobFolders(path) InsertPoints 0,1,fld fld=path+fld+":" fld[0]=RemoveEnding(fld[0],":") else WAVE/T w = Folders(path) Extract/T/FREE w,fld,PathMatch(w,RemoveEnding(CommandPanel#head(token),":")) fld=path+fld+":" endif Variable i,N=CommandPanel#length(fld); Make/FREE/T/N=0 buf for(i=0;i ^()...(...) expr="^()("+expr[1,inf]+")" elseif(GrepString(expr,"^\\(+\\^")) // ((^...)) -> ^(.*)((...)) SplitString/E="^(\\(+)\\^(.*)" expr,pre,pst expr = "^(.*?)"+"("+pre+pst+")" else expr = "(.*?)("+expr+")" endif String head,body,tail SplitString/E=expr s,head,body tail=s[strlen(head+body),inf] if(!strlen(body)) Make/FREE/T w={s,"",""} else Make/FREE/T w={head,body,tail} endif return w End // Ruby: s.scan(/expr/) static Function/WAVE scan(s,expr) String s,expr WAVE/T w=SubPatterns( s, "("+IncreaseSubpatternNumber(1,expr)+")") Variable num=DimSize(w,0) if(num>1 || strlen(expr)==0) DeletePoints 0,1,w endif if(DimSize(w,0)==0 || hasCaret(expr) ) return w else WAVE/T part=partition(s,expr) if(num>1) WAVE/T buf=scan(part[2],expr) Variable Nw=DimSize(w,0), Nb=DimSize(buf,0) if(Nb>0 && Nb>Nw) InsertPoints Nw,Nb-Nw,w elseif(Nb>0) InsertPoints Nb,Nw-Nb,buf endif Concatenate/T {buf},w else Concatenate/T/NP {scan(part[2],expr)},w endif return w endif End // Ruby: s.split(/expr/) static Function/WAVE split(s,expr) String s,expr if(empty(expr) && strlen(s)) Make/FREE/T/N=(strlen(s)) w=s[p]; return w endif WAVE/T w = partition(s,expr) if(empty(w[1])) Make/FREE/T w={s}; return w endif Make/FREE/T buf={w[0]} if(hasCaret(expr)) Concatenate/NP/T {SubPatterns(s,expr)},buf InsertPoints DimSize(buf,0),1,buf; buf[inf]=w[2] else Concatenate/NP/T {SubPatterns(s,expr) ,split(w[2],expr) },buf endif return buf End // Ruby: s.sub(/expr/,"alt") // or s.sub(/expr/){proc} static Function/S sub(s,expr,alt [proc]) String s,expr,alt; FUNCREF Writer_ProtoTypeSub proc WAVE/T w=partition(s,expr) if(empty(w[1])) return s endif if(!ParamIsDefault(proc)) return w[0]+proc(w[1])+w[2] endif WAVE/T a=split(alt,"(\\\\\\d|\\\\&|\\\\`|\\\\'|\\\\+)") Variable i,N=DimSize(a,0); alt="" for(i=0;inum) alt+=sub[num-1] endif else alt+=a[i] endif endfor return w[0]+alt+w[2] End // Ruby: s.gsub(/expr/,"alt") static Function/S gsub(s,expr,alt [proc]) String s,expr,alt; FUNCREF Writer_ProtoTypeSub proc WAVE/T w=partition(s,expr) if(empty(w[1])) return s elseif(hasCaret(expr) || hasDollar(expr)) if(ParamIsDefault(proc)) return sub(s,expr,alt) else return sub(s,expr,alt,proc=proc) endif else if(ParamIsDefault(proc)) return sub(w[0]+w[1],expr,alt)+gsub(w[2],expr,alt) else return sub(w[0]+w[1],expr,alt,proc=proc)+gsub(w[2],expr,alt,proc=proc) endif endif End static Function empty(s) String s return !strlen(s) End static Function hasCaret(expr) String expr return GrepString(expr,"^\\(*\\^") End static Function hasDollar(expr) String expr return GrepString(expr,"\\$\\)*$") End static Function/S IncreaseSubpatternNumber(n,s) Variable n; String s String head,body,tail SplitString/E="(.*?)(\\(\\?(\\d+\\)))(.*)" s,head,body,body,tail if(empty(body)) return s endif return head+"(?"+Num2Str(Str2Num(body)+n)+")"+IncreaseSubpatternNumber(n,tail) End static Function/WAVE SubPatterns(s,expr) String s,expr DFREF here=GetDataFolderDFR(); SetDataFolder NewFreeDataFolder() String s_ =ReplaceString("\"",ReplaceString("\\",s ,"\\\\"),"\\\"") String expr_=ReplaceString("\"",ReplaceString("\\",expr,"\\\\"),"\\\"") String cmd="SplitString/E=\""+expr_+ "\" \""+s_+"\"" SplitString/E=expr s Make/FREE/T/N=(V_Flag) w; Variable i, N=V_Flag for(i=0;i