Fortunately, my case is the simplest one. There will not quotes inside quotes. Therefore, I believe TStringlists will sove the whole problem. It's really amasing what we can do with a TStringlist.
Thank you for the precious tips! 2012/5/13, luciano de souza <[email protected]>: > Hello all, > > I trying to build a very small interpreter. I can type commands like: > > $ add "Luciano de Souza" [email protected] > > Somewhere in my code, I can have something like: > > procedure parse(commandline: string; var params: array of string); > > In this case, the commandline has the format: "add %s %s". So I would > obtain: > > parse('add "Luciano de Souza" [email protected]', params); > > After this command, the parameter would have the following values: > > params[0] := 'add'; > params[1] := 'Luciano de Souza'; > params[2] := '[email protected]'; > > My question is: there is a way to do it easily using a standard class > of Freepascal? > > Luciano > _______________________________________________ fpc-pascal maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
