Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-09

16bit String

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Antal

I was thingink, what if someone should implement in the fpc compiler a 16 bit String, which should work exactly as the 8bit string, which only can handle a 256 char long string.
As long as we can define a string as an array of char, what if we can have a 16bit string, as an array of word?

And also a special switch for the compiler to switch the program from 8 bit string to 16 bit string, so that all the functions working with strings to accept as argument a 16 bit string.
I know, it should require lot of work to implement this function properly, but I think it would be an interesting approach to manage large ros of data.

Of course, I'm sure, ANSIString is a good approach, it needs less memory, but since many systems these days are shipped with gigs of memory, it won't be a big load for the system to manage 16 bit strings.

Well, that only an idea :-)

Felipe Monteiro de Carvalho
to Antal

Doesn´t WideString do the job for you? If you want a array of chars you can just use:

MyString: array[0..255] of WideChar;
Felipe Monteiro de Carvalho