enclosing variable in quotes
Brian K. White
brian at aljex.com
Tue Feb 13 19:55:07 PST 2018
On 02/13/2018 06:29 PM, scooter6--- via Filepro-list wrote:
> If I'm wanting to pass my variable with double quotes included, why does
> processing not like this?
>
> aa=somedata
>
> ab="\"aa\""
ab = "\"" { aa { "\""
Except I find embedding the quotes within a variable generally less
clear than putting the quotes around the variable where/when it's used.
It's better to become good at mentally seeing \" as a single character
in strings rather than try to simplify commands/strings by hiding them.
I actually find, in the long run / more times than not / on average,
commands like this:
system "mycommand -x \"" { aa { "\" >" { tf
easier to decipher accurately, and easier to modify for debugging, than
commands like:
system "mycommand -x" < aa < ">" { tf
The 2nd command is shorter and looks simpler, but hides info that
matters, which makes it more complicated to deal with all in all.
--
bkw
>
> This simply returns literally "aa"
>
> How do I get it to show "somedata"?
>
> This doesn't work either ab="\"{aa\"" or ab="\"<aa\""
>
> thanks
>
> Scott
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20180213/822698cb/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
More information about the Filepro-list
mailing list