Re: An XLISP/Nyquist punctuation question

2 messages Options
Embed this post
Permalink
edgar-rft

Re: An XLISP/Nyquist punctuation question

Reply Threaded More More options
Print post
Permalink
Hi David,

If you want "Hello, there" to be interpreted as a string, just write it
in quotation marks, and the comma will be treatened as a pronounciation
mark and not as a Lisp read-macro, for example:

(print '("Hello, there"))

will print:

("Hello, there")

If you want the comma being part of the symbol "Hello," you can either
write a backslash before the comma like this

(print '(Hello\, there))

or you can write two vertical bars, one before and one behind the comma
like this:

(print '(Hello|,| there))

Both versions, the backslash as well as the vertical bars will print:

(|HELLO,| THERE)

Is this what you wanted?

- edgar




-- 
The author of this email does not necessarily endorse the
following advertisements, which are the sole responsibility
of the advertiser:

______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Audacity-nyquist mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-nyquist
David R. Sky

Re: An XLISP/Nyquist punctuation question

Reply Threaded More More options
Print post
Permalink
Hi Edgar,

Thanks very much for your suggestions, one of them works as I wanted, see
below. The string-to-list function can be seen at

http://www.shellworld.net/~davidsky/useful-x.htm#string-to-list

T
> (setf x (string-to-list "Hello\, there"))
(HELLO (COMMA THERE))
>
; Trying the second method
(setf x (string-to-list "Hello|,| there"))
(|HELLO,| THERE)
> (setf y (string (first x)))
"HELLO,"
>
; That works better!
(dribble)

David

--
David R. Sky
http://www.shellworld.net/~davidsky/


On Mon, 10 Aug 2009, [hidden email] wrote:

> Hi David,
>
> If you want "Hello, there" to be interpreted as a string, just write it
> in quotation marks, and the comma will be treatened as a pronounciation
> mark and not as a Lisp read-macro, for example:
>
> (print '("Hello, there"))
>
> will print:
>
> ("Hello, there")
>
> If you want the comma being part of the symbol "Hello," you can either
> write a backslash before the comma like this
>
> (print '(Hello\, there))
>
> or you can write two vertical bars, one before and one behind the comma
> like this:
>
> (print '(Hello|,| there))
>
> Both versions, the backslash as well as the vertical bars will print:
>
> (|HELLO,| THERE)
>
> Is this what you wanted?
>
> - edgar
>
>
>
>
> -- 
> The author of this email does not necessarily endorse the
> following advertisements, which are the sole responsibility
> of the advertiser:
>
> ______________________________________________________
> GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://movieflat.web.de
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Audacity-nyquist mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-nyquist
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Audacity-nyquist mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-nyquist