Board index » delphi » Can I store an integer in a stringlist ,...

Can I store an integer in a stringlist ,...

through the use of addobject( )
And retrieve it afterwards.

Thanks,
Stef Mientki

 

Re:Can I store an integer in a stringlist ,...


"Stef Mientki" <_s.mien...@mailbox.kun.nl> schreef in bericht
news:3D08AE9E.7060406@mailbox.kun.nl...
Quote
> through the use of addobject( )
> And retrieve it afterwards.

...Why not convert it?
MyStringlist.Add( IntToStr( MyInteger));

and then

StrToInt ( MyStringlist[ thisone] );

From the top of my head, so there maybe errors in this...

Shaggy

Re:Can I store an integer in a stringlist ,...


Thanks Shaggy, but ...

Quote
Shaggy wrote:
>"Stef Mientki" <_s.mien...@mailbox.kun.nl> schreef in bericht
>news:3D08AE9E.7060406@mailbox.kun.nl...

>>through the use of addobject( )
>>And retrieve it afterwards.

>...Why not convert it?

That's because I've to store strings too and I want to find those
strings by indexof.
The number I want to store is again an index of another list.
So any other ideas ??
Stef Mientki
Quote
>MyStringlist.Add( IntToStr( MyInteger));

>and then

>StrToInt ( MyStringlist[ thisone] );

>From the top of my head, so there maybe errors in this...

>Shaggy

Other Threads