Re: list of strings from a string

2020-06-03 Thread Freeman Gilmore
> Also it will not backslash-escape quote marks or newlines or, well, > backslashes. If you want a rendition that can be read back by Scheme, > «write» really is the saner option. > > -- > David KastrupThank you that is good to know. It is working fine for me > now, thanks, ƒg

Re: list of strings from a string

2020-06-03 Thread David Kastrup
Valentin Villenave writes: > On 6/3/20, Freeman Gilmore wrote: >> % Gives me this: (-3 A -6 1 -B), > > Well, it _is_ a list of strings, as you can verify by adding: > > #(display (map string? Y)) > > Or you can use > #(write Y) > instead of (display Y), which will print the double quotes. >

Re: list of strings from a string

2020-06-03 Thread Freeman Gilmore
David and Valentin Thank you. I did not know about #(write ...). I will switch to write from now on. On Wed, Jun 3, 2020 at 11:41 AM Valentin Villenave wrote: > > On 6/3/20, Freeman Gilmore wrote: > > % Gives me this: (-3 A -6 1 -B), > > Well, it _is_ a list of strings, as you can veri

Re: list of strings from a string

2020-06-03 Thread Valentin Villenave
On 6/3/20, Freeman Gilmore wrote: > % Gives me this: (-3 A -6 1 -B), Well, it _is_ a list of strings, as you can verify by adding: #(display (map string? Y)) Or you can use #(write Y) instead of (display Y), which will print the double quotes. > % I need: ("-3" "A" "-6" "1" "-B"), how do

Re: list of strings from a string

2020-06-03 Thread David Kastrup
Freeman Gilmore writes: > \version "2.20.0" > > #(define Z '()) > > j = #(define-void-function % Starting form here. > (x) > (string>?) > (set! Z x )) > > \j "-3 A -6 1 -B" > > #(define Y (string-split Z #\sp )) > #(display Y) #(newline) > > % Gives me this: (-3 A -6 1 -

list of strings from a string

2020-06-03 Thread Freeman Gilmore
\version "2.20.0" #(define Z '()) j = #(define-void-function % Starting form here. (x) (string>?) (set! Z x )) \j "-3 A -6 1 -B" #(define Y (string-split Z #\sp )) #(display Y) #(newline) % Gives me this: (-3 A -6 1 -B), string-split => list, I do want a list but %