Hi Jeremy,
the two problems I found were to do with char and accessing string[0].
string[0] : I ended up doing a global search through the whole app for
[0] and fixed every one of them.
char : unless you are careful, I found that even though the code
compiles, it does the wrong thing to what you expect - I had to inspect
each usage of char and sort its type.
I have CRC routines. I am still using shortstring in them. And the
unit testing passes.
Rohit
On 16/11/2016 10:00, Jeremy Coulter wrote:
HI all.
I have a Delphi 2007 application that I NEED to upgrade to Delphi XE 8
or greater.
The problem is, I am having trouble converting the code due to the
fact that Embarcadero changed how "String" etc. is used when they
added the support for Unicode.
I have had a couple of cracks at the conversion and I am "close" on
one project but I am starting again because I want to make sure I am
using the right variable types and not guessing.
There is a bit of MD5 conversion going on and the different variable
types of course generated diff MD5 codes for the same string being
converted and it is a bit confusing :-)
The main variable types are:
String
Byte
Integer
LongInt
Pointer
Array of Char
PChar
Char
My understanding is the variables should now be :-
String = AnsiString?
Byte = Still Byte?
Integer = Still Integer
LongInt =Still LongInt
Pointer = Still Pointer
Array of Char = PAnsiCHAR ?
PChar = PAnsiChar?
Char = AnsiChar?
Am I correct with the above that I have highlighted in "Red" ??
Thanks, Jeremy
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with
Subject: unsubscribe
--
Regards
*Rohit Gupta*
B.E. Elec., M.E., Mem IEEE, Mem IET
Technical Director
Computer Fanatics Ltd
*Tel *4892280
*Fax *4892290
*Web *www.cfl.co.nz
------------------------------------------------------------------------
This email and any attachments contain information, which is
confidential and may be subject to legal privilege and copyright. If you
are not the intended recipient, you must not use, distribute or copy
this email or attachments. If you have received this in error, please
notify us immediately by return email and then delete this email and any
attachments.
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with
Subject: unsubscribe