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
input/output
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
 
Kevin P Chugh  
View profile  
 More options Mar 23 1996, 3:00 am
Newsgroups: comp.lang.lisp
From: ch...@cs.buffalo.edu (Kevin P Chugh)
Date: 1996/03/23
Subject: input/output

hi - thanks to everyone who helped me with the function i needed -
can anyone tell me some standard input/output functions - i want to
get some keyboard input and  i want to prompt the user for input -
finally, is there a way to concatenate two atoms - for example:

(myfunc 'a 'b)  returns 'ab

thanks again for your help,
kevin


 
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 Mar 24 1996, 3:00 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 1996/03/24
Subject: Re: input/output
[Kevin P Chugh]

|   hi - thanks to everyone who helped me with the function i needed - can
|   anyone tell me some standard input/output functions - i want to get
|   some keyboard input and i want to prompt the user for input - finally,
|   is there a way to concatenate two atoms - for example:
|  
|   (myfunc 'a 'b)  returns 'ab

please consult your friendly Lisp manual, and look for ways to search the
help system.  `apropos' is a useful command.  also, you may find it useful
to browse the entire friendly Lisp manual to see what is available and
which names are used.  applying `apropos' to "read" and "write" should
help.  the Lisp manual should have a section on Input and Output.

as to your second question, the following will do what you say you want,
but you probably do not want what you say you want.

(intern (concatenate 'string (symbol-name 'a) (symbol-name 'b))) => AB
(intern (format nil "~A~A" 'a 'b)) => AB

BTW, functions do not return quoted symbols.  the quote is there to prevent
the evaluator from evaluating the symbol.

(I have this recurring "homework feeling".  please do not use the Net for
homework.  your teachers are paid to help you, and you are supposed to
study on your own, anyway.)

#<Erik>
--
in my next life, I want to be my cat


 
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.
Gerd Moellmann  
View profile  
 More options Mar 24 1996, 3:00 am
Newsgroups: comp.lang.lisp
From: mm...@ibm.net (Gerd Moellmann)
Date: 1996/03/24
Subject: Re: input/output
ch...@cs.buffalo.edu (Kevin P Chugh) writes:

> hi - thanks to everyone who helped me with the function i needed -
> can anyone tell me some standard input/output functions - i want to
> get some keyboard input and  i want to prompt the user for input -
> finally, is there a way to concatenate two atoms - for example:

> (myfunc 'a 'b)  returns 'ab

> thanks again for your help,
> kevin

In Allegro CL

(defun myfunc (first-symbol second-symbol)
  (make-symbol (concatenate-strings first-symbol second-symbol)))

But why work with symbols instead of strings?
--
Gerd Moellmann, Altenbergstr. 6, D-40235 Duesseldorf, Germany
Software Development & Consulting
Internet: mm...@ibm.net / CIS: 100025,3303 / Phone: +49 211 666 881


 
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 Mar 26 1996, 3:00 am
Newsgroups: comp.lang.lisp
From: marc...@lox.icsi.berkeley.edu (Marco Antoniotti)
Date: 1996/03/26
Subject: Re: input/output

In article <mmannwx4a2v6o....@ibm.net> mm...@ibm.net (Gerd Moellmann) writes:

   From: mm...@ibm.net (Gerd Moellmann)
   Newsgroups: comp.lang.lisp
   Date: 24 Mar 1996 19:38:23 +0100
   Organization: None
   Path: agate!howland.reston.ans.net!newsjunkie.ans.net!newsfeeds.ans.net!news-m01. ny.us.ibm.net!hpxu!not-for-mail
   Lines: 22
   Sender: mm...@ibm.net
   Distribution: world
   References: <4j1ulq$...@azure.acsu.buffalo.edu>
   NNTP-Posting-Host: slip139-92-41-123.ut.nl.ibm.net
   X-Newsreader: Gnus v5.1
   X-NNTPDaemon: changi 0.9 for OS/2

   ch...@cs.buffalo.edu (Kevin P Chugh) writes:

   > hi - thanks to everyone who helped me with the function i needed -
   > can anyone tell me some standard input/output functions - i want to
   > get some keyboard input and  i want to prompt the user for input -
   > finally, is there a way to concatenate two atoms - for example:
   >
   > (myfunc 'a 'b)  returns 'ab
   >
   > thanks again for your help,
   > kevin

   In Allegro CL

   (defun myfunc (first-symbol second-symbol)
     (make-symbol (concatenate-strings first-symbol second-symbol)))

   But why work with symbols instead of strings?

Good point.

However a slightly better and more ANSI version is

(defun myfunc (s1 s2)
   (declare (type symbol s1 s2))
   (make-symbol (concatenate 'string
                             (symbol-name s1)
                             (symbol-name s2))))
--
Marco Antoniotti - Resistente Umano
=========================================================================== ====
International Computer Science Institute        | marc...@icsi.berkeley.edu
1947 Center STR, Suite 600                      | tel. +1 (510) 643 9153
Berkeley, CA, 94704-1198, USA                   |      +1 (510) 642 4274 x149
=========================================================================== ====
        ...it is simplicity that is difficult to make.
        ...e` la semplicita` che e` difficile a farsi.
                                Bertholdt Brecht


 
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.
dcwhite  
View profile  
 More options Mar 27 1996, 3:00 am
Newsgroups: comp.lang.lisp
From: dcwh...@phoenix.net (dcwhite)
Date: 1996/03/27
Subject: Re: input/output
In article <3036660881657...@arcana.naggum.no>,
   Erik Naggum <e...@naggum.no> wrote:

Well said, regarding the issue of homework.  If everyone got
their answers this way, there would be no "next generation"
to pass the "baton" to, and we would all lose a great deal of
expertise after the last "old-timer" passed on.  Excuse the
allusions - hopefully everyone gets the point (it takes hard
work to develop expertise in any field).

dcwh...@phoenix.net


 
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 »