Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Why is it not possible to use double quotes within arguments to a rebol

 [1/10] from: Micael::Gullmes::telenor::se at: 1-Sep-2003 15:47


Hi all, I am trying to call a rebolscript from another rebolscript and pass a rebol block as an argument. However it seems as if the double quotes are removed before the args are passed on to system/script/args The same behaviour is seen if you start rebol with the -- option: For example: rebolcmd -- ["string" "string with space" {string with "" }]
>> probe system/script/args
[string string with space {string with }] == "[string string with space {string with }]" Is this a bug or is Rebol designed this way on purpose? Does anyone have a suggestion how to get around this problem? I have tried this using RebolCommand for Windows and Solaris and RebolView for Win, same result everywhere. Brgds /Micael

 [2/10] from: Micael:Gullmes:telenor:se at: 1-Sep-2003 16:07


Hi again, I just thought I'd try system/options/args, but that does not cut it either rebolcmd -- ["string" "string with space" {string with "" }]
>> system/options/args
== ["[string" "string with space" "{string" "with" " }]^/"] Here is another example to clearify what I'm trying to achieve: /opt/rebol/rebolcmd -- {[[1] [2] ["3"] [] []]}
>> system/script/args
== "[[1] [2] [3] [] []]"
>> system/options/args
== ["[[1]" "[2]" "[3]" "[]" "[]]"] I would like to get the following result: ---------------wanted result-----
>> system/script/args
== [[1] [2] ["3"] [] []] or == "[[1] [2] ["3"] [] []]" ---------------/wanted result----- Brgds /Micael

 [3/10] from: g:santilli:tiscalinet:it at: 1-Sep-2003 16:50


Hi Gullmes, On Monday, September 1, 2003, 4:07:38 PM, you wrote: GM> /opt/rebol/rebolcmd -- {[[1] [2] ["3"] [] []]}
>>> system/script/args
GM> == "[[1] [2] [3] [] []]" I think that's the OS stripping out the quotes. You may need to escape them based on your OS or shell. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [4/10] from: Micael::Gullmes::telenor::se at: 1-Sep-2003 17:30

=?iso-8859-1?Q?=C5terkalla_meddelande=3A_=5BREBOL=5D_Re=3A_Why_is_it_?=


Gullmes Micael skulle vilja återkalla meddelandet, [REBOL] Re: Why is it not possible to use double quotes within arguments to a rebol script?.

 [5/10] from: Micael:Gullmes:telenor:se at: 1-Sep-2003 17:30

SV: Re: Why is it not possible to use double quotes within arguments to


-----Ursprungligt meddelande----- Från: Gabriele Santilli [mailto:[g--santilli--tiscalinet--it]] Skickat: den 1 september 2003 16:51 Till: Gullmes Micael Ämne: [REBOL] Re: Why is it not possible to use double quotes within arguments to a rebol script? Hi Gullmes, On Monday, September 1, 2003, 4:07:38 PM, you wrote: GM> /opt/rebol/rebolcmd -- {[[1] [2] ["3"] [] []]}
>>> system/script/args
GM> == "[[1] [2] [3] [] []]" I think that's the OS stripping out the quotes. You may need to escape them based on your OS or shell. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [6/10] from: Micael:Gullmes:telenor:se at: 1-Sep-2003 17:34


Hi Gabriele, thanks, that would explain it. I might go back to passing blocks using temporary files. Brgds /Micael -----Ursprungligt meddelande----- Från: Gabriele Santilli [mailto:[g--santilli--tiscalinet--it]] Skickat: den 1 september 2003 16:51 Till: Gullmes Micael Ämne: [REBOL] Re: Why is it not possible to use double quotes within arguments to a rebol script? Hi Gullmes, On Monday, September 1, 2003, 4:07:38 PM, you wrote: GM> /opt/rebol/rebolcmd -- {[[1] [2] ["3"] [] []]}
>>> system/script/args
GM> == "[[1] [2] [3] [] []]" I think that's the OS stripping out the quotes. You may need to escape them based on your OS or shell. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [7/10] from: greggirwin:mindspring at: 1-Sep-2003 17:34


Hi Micael, GS> I think that's the OS stripping out the quotes. You may need to GS> escape them based on your OS or shell. GM> I might go back to passing blocks using temporary files. Another trick is to use an alternate character, or characters, on the command line and then replace them once REBOL gets it. -- Gregg

 [8/10] from: antonr:iinet:au at: 2-Sep-2003 12:48


Maybe use enbase & debase ?
>> val: enbase {"hello"}
== "ImhlbGxvIg==" ; now pass to command line
>> to-string debase val
== {"hello"} Anton.

 [9/10] from: Micael:Gullmes:telenor:se at: 2-Sep-2003 8:49


Thanks Anton, thats a nice and simple solution! Brgds /Micael -----Ursprungligt meddelande----- Från: Anton Rolls [mailto:[antonr--iinet--net--au]] Skickat: den 2 september 2003 04:49 Till: [rebol-list--rebol--com] Ämne: [REBOL] Re: Why is it not possible to use double quotes within arguments to a rebol script? Maybe use enbase & debase ?
>> val: enbase {"hello"}
== "ImhlbGxvIg==" ; now pass to command line
>> to-string debase val
== {"hello"} Anton.

 [10/10] from: nitsch-lists:netcologne at: 2-Sep-2003 19:01


linux/bash viw e/pad.r '[[1] [2] ["3"] [] []]' single quotes. windows? -Volker Am Dienstag, 2. September 2003 04:48 schrieb Anton Rolls: