Pre Delphi 2008-9 Unicode Do's and Dont's

This is a discussion on Pre Delphi 2008-9 Unicode Do's and Dont's within the Delphi forums in Programming Languages category; "Nick Hodges (Embarcadero)" <nick.hodges @ codegear.com> wrote > ... set of Char no longer works, > since Chars are now two bytes. I wonder why the old set's max size (2^8 bits, 32 bytes) has not grown in proportion to available memory. The old set was invented when available memory was about 640 KB. Now, available memory is easily 1 GB. The new set could have a max size of 2^16 bits, 8192 bytes in size. Note that 640 KB / 32 Bytes = 20,000 1 GB / 32 Bytes = 31,000,000 1 GB / 8192 Bytes = 122,000 Regards, ...

Go Back   Application Development Forum > Programming Languages > Delphi

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #181  
Old 08-07-2008, 11:19 AM
John Herbster
Guest
 
Default Re: Pre Delphi 2008-9 Unicode Do's and Dont's

"Nick Hodges (Embarcadero)" <nick.hodges@codegear.com> wrote
> ... set of Char no longer works,
> since Chars are now two bytes.


I wonder why the old set's max size (2^8 bits, 32 bytes)
has not grown in proportion to available memory. The old
set was invented when available memory was about 640 KB.
Now, available memory is easily 1 GB. The new set could
have a max size of 2^16 bits, 8192 bytes in size.
Note that
640 KB / 32 Bytes = 20,000
1 GB / 32 Bytes = 31,000,000
1 GB / 8192 Bytes = 122,000
Regards, JohnH

Reply With Quote
  #182  
Old 08-07-2008, 12:12 PM
Nick Hodges (Embarcadero)
Guest
 
Default Re: Pre Delphi 2008-9 Unicode Do's and Dont's

Lars Fosdal wrote:

> if UpperCase(string[i]) in ['F', 'X', 'E'] then ;


Actually, that code will still compile and work, but it is recommended
that you alter this to:

if CharInSet(UpperCase(string[i] , ['F', 'X', 'E']) then
begin
msg := 'You gotta be Norwegian';
end;

--
Nick Hodges
Delphi Product Manager - Embarcadero
http://blogs.codegear.com/nickhodges
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:26 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.