1. simple help
I am trying to take an integer and turn it into a string
example
integer a
sequence b
a=44
how do I asign b to equal "44"?
2. Re: simple help
b = "44"
Now you shouldn't think that b = a, cause they are different types.
To get the value 44 back out of variable b, you can do this:
-- example.ex
include get.e
object c
c = value(b)
if c[1] = GET_SUCCESS then
c = c[2]
end if
-- end of example.ex
You see, c is an object, that means it can become any type you want it.
So if you're unsure which type a variable is or can become, declare it as an
object.
----- Oorspronkelijk bericht -----
Van: Joseph Bestler <joe at MLMDIGEST.NET>
Aan: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Verzonden: zondag 19 december 1999 23:11
Onderwerp: simple help
> I am trying to take an integer and turn it into a string
>
>
> example
>
> integer a
> sequence b
> a=44
>
> how do I asign b to equal "44"?
3. Re: simple help
- Posted by JJProg at CYBERBURY.NET
Dec 19, 1999
EU>I am trying to take an integer and turn it into a string
EU>example
EU>integer a
EU>sequence b
EU> a=44
EU>how do I asign b to equal "44"?
integer a
sequence b
a = 44
b = sprintf("%d",a)
sprintf is just like printf, except it returns what printf would print
to the screen or file.
Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/
5. Re: simple help
Sorry, my Lotus Notes choked... But you have got it from Jeffrey anyway. jiri
6. Re: simple help
----- Original Message -----
From: <JJProg at CYBERBURY.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, December 19, 1999 5:02 PM
Subject: Re: simple help
> EU>I am trying to take an integer and turn it into a string
>
>
> EU>example
>
> EU>integer a
> EU>sequence b
> EU> a=44
>
> EU>how do I asign b to equal "44"?
>
> integer a
> sequence b
> a = 44
> b = sprintf("%d",a)
>
> sprintf is just like printf, except it returns what printf would print
> to the screen or file.
Being that i am in the "can't figure out which print to use" pavilion, i use
sprint(), so..
include misc.e
integer a
sequence b
a = 44
b = sprint(a)
Kat