Q&A's, tips, howto's
cameyo
Posts: 183 Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:
Post
by cameyo » Tue Jun 14, 2022 5:43 am
Why this?
Code: Select all
(setq a 10)
(setq b 20)
(string "'"a" '"b"")
-> "'10 '20"
cameyo
Posts: 183 Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:
Post
by cameyo » Wed Jun 15, 2022 6:06 am
This is normal:
Code: Select all
(string a b)
-> "1020"
(string "a""b")
-> "ab"
This is strange, but you just need to know:
ralph.ronnquist
Posts: 228 Joined: Mon Jun 02, 2014 1:40 am
Location: Melbourne, Australia
Post
by ralph.ronnquist » Wed Jun 15, 2022 9:00 am
I'm confused about why you appear confuse... of course (string ""a""b"") is the same as (string "" a "" b "") ; the string function packs together the stringifying of its arguments ignoring any (optional) whitespace between them. No strangeness involved afaict.
cameyo
Posts: 183 Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:
Post
by cameyo » Wed Jun 15, 2022 5:20 pm
Ok. I am old...and often confused.
Thanks HPW and Ralph.