Re: [fpc-pascal] Why is Random(255) some 529x slower compared
Why don't refactoring the slow RTL random to MyRandom so you can switch? You can do it in a few miniutes. In my opinion the current RTL random function should not change, because other FPC developers are depend on current code base. But a fast random or other random implementation should put into Math unit for choices. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] GLES Apps on Android
I google the web and saw FPC can cross compile to Android. Whave GLES header for FPC too, so we have chance to build multimedia applications without the Android NDK? An other question is I cant find the steps to cross compile to Android ,is it just as simple as I create a arm-linux project in Lazarus and I can got a hello world program? _ Hotmail 有 Microsoft 強力垃圾信件保護機制,值得您信賴。 https://signup.live.com/signup.aspx?id=60969 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Is it save to think default value of untouched string is ''?
But ShortStrings also store the length in string[0]. If I do a append, I think the string will append to string[1] So don't assume string are always initialized with null string? Message: 5 Date: Sun, 7 Mar 2010 00:17:03 +0100 From: Mattias Gaertner nc-gaert...@netcologne.de Subject: Re: [fpc-pascal] Is it save to think default value of untouched string is ''? To: fpc-pascal@lists.freepascal.org Message-ID: 20100307001703.2a1b2...@limapholos Content-Type: text/plain; charset=US-ASCII SetLength does not initialize the string characters. ShortStrings are not always initialized. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Is it save to think default value of untouched string is ''?
I have a a program that will read a string and parse the string to some sub-strings in sub routine. I add every character to a local string buffer in sub routine. The code work well in delphi but suddenly fail in fpc. When I watch the buffer, it display some garbage instead of null string when the buffer is untouched. The following output is supposed to be 1(and it is true here), but in more complicated situation it is not true. You may get 'bla bla bla 1'. procedure PrintString; var str1 : string; procedure createContent(var buf : string); var str2 :string; begin buf := str2; buf := buf + '1'; end; begin writeln(str1); end; My question is we should always assign null string to variable before use or this a bug if I get garbage in unused string? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Winapi Callback problem on wince wedget.[arm asm related]
I need to use the waveout function of mmsystem on wince and write a class to Encapsulate it, so I need to use MakeObjectInstance on wince project so I can pass methods as callback. But MakeObjectInstance is only avaliable in win32 classes.pp, not wince one. When I copy the MakeObjectInstance things, I found there is a assembler function that I have no idea how to rewrite in arm's instructions. Anyone could help? function get_method_offset : Pointer;assembler;nostackframe; asm movl(%esp),%eax addl$5,%eax end; ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Using DirectDraw on Wince need help
I found a header convertion post in mail arc, and I follow the post to modify the ddraw.pas. Now I can create surface on WM6 pro , but I cant BitBlt any thing on surface using TPicturre. Hope someone can give suggestion on how to make it work. Current example to blit a jpg on DDraw Surface full source and binary is here: http://cid-b09cde3cb849642d.skydrive.live.com/self.aspx/Public/DDraw%20WMV2.zip ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal