From: Kevin P Chugh
Subject: input/output
Date: 
Message-ID: <4j1ulq$kra@azure.acsu.buffalo.edu>
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

From: Erik Naggum
Subject: Re: input/output
Date: 
Message-ID: <3036660881657292@arcana.naggum.no>
[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
From: dcwhite
Subject: Re: input/output
Date: 
Message-ID: <4jae0l$a74@gryphon.phoenix.net>
In article <················@arcana.naggum.no>,
   Erik Naggum <····@naggum.no> wrote:
>[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>

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).

·······@phoenix.net
From: Gerd Moellmann
Subject: Re: input/output
Date: 
Message-ID: <mmannwx4a2v6o.fsf@ibm.net>
·····@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: ·····@ibm.net / CIS: 100025,3303 / Phone: +49 211 666 881
From: Marco Antoniotti
Subject: Re: input/output
Date: 
Message-ID: <s08vijru5d3.fsf@lox.ICSI.Berkeley.EDU>
In article <·················@ibm.net> ·····@ibm.net (Gerd Moellmann) writes:

   From: ·····@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: ·····@ibm.net
   Distribution: world
   References: <··········@azure.acsu.buffalo.edu>
   X-Newsreader: Gnus v5.1
   X-NNTPDaemon: changi 0.9 for OS/2

   ·····@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	| ·······@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