nacer@hpmcaa.mcm.hp.com (Abdenacer Moussaoui) (02/16/91)
I have been looking for some source that would implement a replacement for paramstr() such that it returns quoted items as a single token much like C argv[][] (I am not a fan of C this is just a reference :-) ) for example calling a program with: -s /N "Smith Brown" foo.2 should be parsed as: param# paramstr 1 -s 2 /N 3 "Smith Brown" 4 foo.2 Currently in TP single or double quoted strings containing white space are broken into individual tokens. Thank you for any pointers. Thank you. --Abdenacer (nacer@hpmcaa.mcm.hp.COM) -- Thank you. --Abdenacer (nacer@hpmcaa.mcm.hp.COM)
ts@uwasa.fi (Timo Salmi) (02/16/91)
In article <1991Feb16.005252.24456@hpmcaa.mcm.hp.com> nacer@hpmcaa.mcm.hp.com (Abdenacer Moussaoui) writes: >I have been looking for some source that would implement a replacement >for paramstr() such that it returns quoted items as a single token : >Currently in TP single or double quoted strings containing white space >are broken into individual tokens. : Read the entrire command line into a single string, and then parse that string whatever way your problem warrants. (If you don't know how to read the entire command line, see /pc/ts/tsfaq17.arc FAQ collection for the code.) ................................................................... Prof. Timo Salmi Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37 School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun