CharArrayPtr = ^CharArray; CharArray = array[0..MaxInt-1] of Char; How to convert to Delphi 2009? Bill
![]() |
0 |
![]() |
Bill Miller wrote: > CharArrayPtr = ^CharArray; > CharArray = array[0..MaxInt-1] of Char; > > How to convert to Delphi 2009? > > Bill it depends heavelly on how it is used fearther down in your project and what you want to convert it to. I you want to simple convert the declarations ignoring UNicode altogether then the only think you have to change is the CharArray declaratin from a Char to an AnsiChar eg CharArrayPtr = ^CharArray; CharArray = array[0..MaxInt-1] of AnsiChar; //----------- this changed This Shoold be enough that the procedures using it and are expecting ANSI characters in the string will work with out any changes. regards Yannis. -- "The difference between pornography and erotica is lighting." -- Gloria Leonard
![]() |
0 |
![]() |
> it depends heavelly on how it is used fearther down in your project and > what you want to convert it to. > > I you want to simple convert the declarations ignoring UNicode > altogether then the only think you have to change is the CharArray > declaratin from a Char to an AnsiChar eg > > CharArrayPtr = ^CharArray; > CharArray = array[0..MaxInt-1] of AnsiChar; //----------- this changed > > This Shoold be enough that the procedures using it and are expecting > ANSI characters in the string will work with out any changes. Hi Yannis, I am trying to maintain the TString type without using Ansi. I think I should try to maintain Unicode capability. I but am not sure how to handle these conversions yet. Bill
![]() |
0 |
![]() |
Bill Miller wrote: > Hi Yannis, > > I am trying to maintain the TString type without using Ansi. I think > I should try to maintain Unicode capability. I but am not sure how > to handle these conversions yet. CharArrayPtr = ^CharArray; CharArray = array[0..(MaxInt div SizeOf(Char)) - 1] of Char; This would be the recomended way to declare it I guess. regards Yannis. -- "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -- Albert Einstein (1879-1955)
![]() |
0 |
![]() |
> I am trying to maintain the TString type without using Ansi. I think I > should try to maintain Unicode capability. I but am not sure how to > handle > these conversions yet. Why without using Ansi ? Seems like trying to make a form, but without using buttons :)
![]() |
0 |
![]() |