How to? Passing arg to gosub with white spaces

Oct 18, 2008
273
1
#1
Hello --

this code is not working as I expected it wot work ... I want the subroutine out just to echo
the entire argument as text -- what did I miss?

Thanks

fpe

@echo on
set item=foo bar
set qitem=%@quote["%item"]

gosub out "This is a test %qitem"
quit

:out [ text ]

echo %text
return
 
#2
Same result here. And same result if I pass %item and not %qitem as follows:

gosub out "This is a test "%item""

But if the goal is to get the entire string displayed, quoted, why not do this:

gosub out "This is a test %item"

Result (here, anyway):

"This is a test foo bar"