Re: Integer to String

new topic     » goto parent     » topic index » view thread      » older message » newer message

Eduardo Uemura Okada wrote:
>
>     Hi all, I am sending a little function to perform an integer-to-string
> convertion.
>     No, I am sure, the value function can perform a string-to-integer, this
> one makes the reverse way.
>     Sometime past I wrote to this list asking for something like this,
> because I needed to write to the disk and read with getc to convert to a
> string, now It does in a mathematic way (or something like), I don't know if
> it will be useful, it can convert values from 1 to 999.
>     Bye.

i've got an easier way

sequence s
integer i

i = 5

s = sprintf("%d", i)

? s     -- prints "5"

--

 .   m     i     k     e           b     u     r     r     e     l     l   .

. http://mikpos.home.ml.org . ftp://ftp.scene.org/pub/music/artists/mikpos/ .

. m   i   k   p   o   s   @   s   o   f   t   h   o   m   e   .   n   e   t .

    .   m     i     k     p     o     s           1     9     9     8   .

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu