Not that it really matters, but will D09 allow you to use letters like '?Ü', '?ò' and '?Ö' in your class, methods and vars names then? Or is it only string and character data that are unicode?
Not that it really matters, but will D09 allow you to use letters like '?Ü', '?ò' and '?Ö' in your class, methods and vars names then? Or is it only string and character data that are unicode?
Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits
Because they couldn't do that without including two copies of the RTL and VCL, one Unicode-based and the other ANSI-string-based. String manipulation is used all over the place, even in the System unit that provides the most basic functionality and is included as a "hidden" USES include in every unit in your project.Originally Posted by arthurprs
I wrote that based on my experience with trying to get my game engine up and running in D2009. The compiler choked when it hit PascalScript. (For those that don't know, PascalScript is a system that allows your program to run scripts written in Object Pascal, making customization and scripting very simple.) It uses chars and strings all over the place. I tried redefining all strings as AnsiStrings, which solved some of the problems, but there are places where it calls RTL string-related functions, all of which are defined in Unicode. That was about where things started to get more complicated than I could understand without an in-depth study of the inner workings of PascalScript, so I wrote up a report of what was going on, sent it to Carlo Kok (the guy who wrote PS and maintains it,) and basically dumped the problem in his lap.Originally Posted by DarkBow
Other non-trivial projects are going to have similar problems. The Object Pascal pngimage library is now broken because it uses chars and Pchars for single-byte manipulations. (There's a new PByte type to replace the old PChars, but some of the things Pngimage uses PChars for won't work with PBytes, and you have to go through and correct those ones individually or it won't compile.) D2009 supposedly has PNG support built in somewhere, but I couldn't find it.
In short, the Unicode thing is a backwards-compatibility nightmare. But aside from that, D2009 looks like a wonderful system, and it'll be great for creating brand new projects on. It just can't handle your old ones until you've ported them to Unicode.
The following compiles and works:Originally Posted by pstudio
[pascal]
procedure ?¶•?§?™;
begin
writeln('wat');
end;
begin
?¶•?§?™;
end.
[/pascal]
Peregrinus, expectavi pedes meos in cymbalis
Nullus norvegicorum sole urinat
Nice! So basically, we've now got a "black list" of characters that you can't use in names (such as spaces and a few symbols that mean something in Pascal) and not a "white list" of characters that you can use?
o boy, gonna download straight away when I get home today
NecroSOFT - End of line -
This must be a nightmare. I see all the script kiddies writing code with function names like that, it must be a nightmare. Needing more time for writing the name as implementing function logic. Yea, this will be the future.Code:procedure ?¶???•?§?™;
It is often very hard to read code with Russian characters, but this will top it.
Regards
Thomas[/code]
Nice way to obfuscate code ...and there might be invisible or almost-invisible characters to use, like:
procedure ¬?;
¬?;
seems totally pointless to me to use those weird looking chars.
Use those weird characters and in a week you won't know what is what yourself. Super.
I am now considering purchasing Delphi 2009 - mainly because PNG is part of the system, and I continually have issues with png at the moment. e.g., I can add pngs at design time, restart Delphi and the pngs are missing.
The views expressed on this programme are bloody good ones. - Fred Dagg
I can't see the problem in using those characters. For instance the first 3 characters are a part of the Danish alphabet. Normally I'm just using English in my code (not only because I didn't have a choice before) but for some projects it may be relevant to use local characters.Originally Posted by KidPaddle
Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits
I'm sorry, in Germany we have non standard characters too, but i never use them. I have no idea, how i can write on my keyboard those characters.
Writing code for your own, without sharing code to other, maybe it is ok, but what will non danish people doing with this names? Do a nice game, what it means?
Thomas
Bookmarks