Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fw: How to convert "((X))" to X
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Francesco Moi  
View profile  
 More options Nov 30 2001, 11:44 am
Newsgroups: comp.lang.lisp
From: francesco...@europe.com (Francesco Moi)
Date: 30 Nov 2001 08:44:46 -0800
Local: Fri, Nov 30 2001 11:44 am
Subject: Fw: How to convert "((X))" to X
Hi all.

I'm NOT using Common Lisp, but a software wich must to be customized
by using a kind-of-Lisp: CoCreate SolidDesigner.

What I'm trying to do is comparing a String and a Symbol.

My String is: "John"
And my Symbol is: John

But always I test:
(string= Name1 Name2)... it's always NIL

And then my idea is removing quotes " " from Name1, or adding them to
Name2...

I do not know what to do...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kent M Pitman  
View profile  
 More options Nov 30 2001, 12:27 pm
Newsgroups: comp.lang.lisp
From: Kent M Pitman <pit...@world.std.com>
Date: Fri, 30 Nov 2001 17:26:29 GMT
Local: Fri, Nov 30 2001 12:26 pm
Subject: Re: Fw: How to convert "((X))" to X

francesco...@europe.com (Francesco Moi) writes:
> I'm NOT using Common Lisp, but a software wich must to be customized
> by using a kind-of-Lisp: CoCreate SolidDesigner.

> What I'm trying to do is comparing a String and a Symbol.

> My String is: "John"
> And my Symbol is: John

> But always I test:
> (string= Name1 Name2)... it's always NIL

Symbols are upcased by default by the Lisp reader (its parser).
If you do:

 (string= "John" 'John)

you are really executing

 (STRING= "John" 'JOHN)

STRING= is a case-sensitive comparison.  Use STRING-EQUAL or put
||'s around the symbol John to retain its case.

 (string= "John" '|John|)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Nov 30 2001, 1:49 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: Fri, 30 Nov 2001 18:48:58 GMT
Local: Fri, Nov 30 2001 1:48 pm
Subject: Re: Fw: How to convert "((X))" to X
* Francesco Moi
| I'm NOT using Common Lisp, but a software wich must to be customized
| by using a kind-of-Lisp: CoCreate SolidDesigner.

  This information is crucial to get help.  "Lisp" is not one language, but
  the one people have a right to assume in the absence of antyhing else you
  mean is Common Lisp.  If you do know about the default, it is not an
  error to overspecify.

| What I'm trying to do is comparing a String and a Symbol.

  In Common Lisp, this works because a symbol is a string designator.
  I.e., when you use a symbol in a string "context", what you get is really
  (symbol-name symbol).  This may not be true for other Lisp, so you may
  have to make that function call explicitly.

| And then my idea is removing quotes " " from Name1, or adding them to
| Name2...

  I hope you have made one of those changes at a time.

///
--
  The past is not more important than the future, despite what your culture
  has taught you.  Your future observations, conclusions, and beliefs are
  more important to you than those in your past ever will be.  The world is
  changing so fast the balance between the past and the future has shifted.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marco Antoniotti  
View profile  
 More options Nov 30 2001, 2:22 pm
Newsgroups: comp.lang.lisp
From: Marco Antoniotti <marc...@cs.nyu.edu>
Date: 30 Nov 2001 14:22:14 -0500
Local: Fri, Nov 30 2001 2:22 pm
Subject: Re: Fw: How to convert "((X))" to X

francesco...@europe.com (Francesco Moi) writes:
> Hi all.

> I'm NOT using Common Lisp, but a software wich must to be customized
> by using a kind-of-Lisp: CoCreate SolidDesigner.

That explains a lot of the mis-communication.  We are in presence of
an instance of Greenspun's Tenth Rule. :)

I do not think that many people on this group are familiar with the
"Lisp" implemented by the tool you are using.  The answer that I gave
and saw were all relating to Common Lisp.

Cheers

--
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lieven Marchand  
View profile  
 More options Nov 30 2001, 4:13 pm
Newsgroups: comp.lang.lisp
From: Lieven Marchand <m...@wyrd.be>
Date: 30 Nov 2001 17:51:12 +0100
Local: Fri, Nov 30 2001 11:51 am
Subject: Re: Fw: How to convert "((X))" to X

You can try the two approaches:

(string= (symbol-name 'John) "JOHN")

or

(eql 'John (intern "JOHN"))

Note that I put the string in upper case. Common Lisp in default
reader mode will translate symbol names to upper. You might have to
experiment to see whether your Lisp implementation does the same.

--
Lieven Marchand <m...@wyrd.be>
She says, "Honey, you're a Bastard of great proportion."
He says, "Darling, I plead guilty to that sin."
Cowboy Junkies -- A few simple words


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »