David Hanley <···@ncgr.org> wrote:
> I dunno, looks a lot like homework!
Exactry.
I'm doing TA.
The requirement is to simplify a list of arithmetic ops + numbers.
No variable (symbols) in the test file, but one of students really
wants to know if it's possible to simplify variables.
> Look at the functions "concatenate" and "intern"
> these should get you started.
I already checked these. They're not helpful AFAIK.
If anybody knows a nice trick to concatenate strings or symbols, please
let me know. TIA.
t
In article <············@mark.ucdavis.edu>,
Takashi Ishihara <······@logan.ucdavis.edu> wrote:
>David Hanley <···@ncgr.org> wrote:
>> I dunno, looks a lot like homework!
>
>Exactry.
>I'm doing TA.
>The requirement is to simplify a list of arithmetic ops + numbers.
>No variable (symbols) in the test file, but one of students really
>wants to know if it's possible to simplify variables.
>
>> Look at the functions "concatenate" and "intern"
>
>> these should get you started.
>
>I already checked these. They're not helpful AFAIK.
>If anybody knows a nice trick to concatenate strings or symbols, please
>let me know. TIA.
(concatenate 'string "-" (string string-or-symbol))
The STRING function will coerce a symbol into a string, and return a string
unchanged.
--
Barry Margolin, ······@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
Strings:
(concatenate 'string ...)
Symbols:
(intern (concatenate 'string (string symbol) ...))
you might want to get fancier with packages, though.
--
Thomas A. Russ, USC/Information Sciences Institute ···@isi.edu