16bit String

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

16bit String

Antal-2
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 :-)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: 16bit String

Felipe Monteiro de Carvalho
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal