[fpc-pascal]longint -> Pchar
baron.kractor at cogeco.ca
Wed Dec 10 22:28:47 CET 2003
Got that particular issue fixed. Now I'm having some issues w/ really
strange query results being returned. Even with the example code that came
w/ the version of fpc that I'm using, I get the following results from a
query that should return 0 or nil ...
Number of records returned : 8589934592
Number of fields per record : 0
Talked to some people, and it was suggested that perhaps the version of
libmysql.dll I'm using doesn't match the version of mysql that the program
is accessing. The machine that's hosting the mysqld is running openbsd 3.4,
and the output of "mysql --version" results in the following ...
mysql Ver 11.18 Distrib 3.23.57, for unknown-openbsd3.4 (i386)
Anyone else had this problem before?
From: fpc-pascal-admin at lists.freepascal.org
[mailto:fpc-pascal-admin at lists.freepascal.org] On Behalf Of Marco van de
Sent: December 10, 2003 5:43 AM
To: fpc-pascal at lists.freepascal.org
Subject: Re: [fpc-pascal]longint -> Pchar
> Is there a (hopefully easy) way to convert a longint variable to either
> Pchar / string / ansistring without changing the contents of the variable?
> For example, longint variable containing "12345" converted to one of the
> string types would still print as "12345". Closest I've been able to get
> far results in the converted variable being printed as some strange
> characters ...
You always need a conversion. Either str() (in system) or sysutils.inttostr.
The memory layout of a string and longint is not the same.
fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal