I want to know how string type can be converted integer type.
For example, "234" -> 234.
I know the way of converting interger to string but don't find the
way string to integer.
Regards,
&&&&&&&&&
Tae-Sun Chung &&&
tel. : 880-1830 &&
fax. : 882-0269 & _____ ___________
email: ·······@papaya.snu.ac.kr II__|[] | | I I |
| |_|_ I I _|
< OO----OOO OO---OO
======= http://wwwoopsla.snu.ac.kr/researchers/tschung/ =======
In article <··········@snunews.snu.ac.kr> ·······@papaya.snu.ac.kr
(Tae-Sun Chung) writes:
> I want to know how string type can be converted integer type.
>
> For example, "234" -> 234.
Try PARSE-INTEGER and/or READ-FROM-STRING. BTW, there are a couple of
good ways to try to figure out this info yourself, even if you don't
have a textbook that covers it.
(A) Use APROPOS. Ie (apropos "integer" :User) would have given you all
function names (all symbols, really) in the main "User" package
containing the substring "integer".
(B) The ANSI Lisp spec (HyperSpec) and _Common Lisp the Language_ are both
available online. See the "Online References" section of
<http://www.apl.jhu.edu/~hall/lisp.html>
Cheers-
- Marty
(proclaim '(inline skates))
From: Asle Olufsen
Subject: Re: Can string be converted integer type?
Date:
Message-ID: <4oi7ft$hp3@ondur.ifi.uio.no>
In article <··········@snunews.snu.ac.kr>, ·······@papaya.snu.ac.kr (Tae-Sun Chung) writes:
> I want to know how string type can be converted integer type.
>
> For example, "234" -> 234.
>
> (read-from-string "234")
234 ;
3
Oluf
> I want to know how string type can be converted integer type.
>
> For example, "234" -> 234.
>
> I know the way of converting interger to string but don't find the
>
> way string to integer.
>
(* (read-from-string "5") 5)
25
Hope this helps
priya
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Whatever you can do or dream, begin it.
Boldness has genius, power and magic to it
GOETHE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=