Re: display integers in a clist

On Thu, 29 Jan 2004, Thomas Keaney wrote:
Would anyone know of how to convert an integer to a character(convert 1
to '1') as I want to display this in a clist. Also, I want to
concatenate this to a word(for example MEMORY 1 ),where the word is
MEMORY and the integer I want to display is 1 in the clist. Thanks in
Hello Thomas,
if you want to convert an integer number to the corresponding string you
can generally use the function
int snprintf(char *str, size_t size, const  char  *format, ...);

char[256] buffer;
snprintf(buffer, 256, "MEMORY %d", value);

After the conversion you can use the string in your clist.

Peter Krüger

applied software solutions (appss) GmbH
Sandtorstr. 23
D-39106 Magdeburg

Phone:  +49-(0)391-54486-19388
Fax:    +49-(0)391-54486-19222
email:  krueger appss de

Managing Director: Uwe Hess, Dietmar Schäfer
Register: HRB12386, AG Mageburg

"Virtual business becomes reality!"

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]