[fpc-pascal] Growing dynamic arrays performance (another thing)

2008-07-21 Thread L
Is there a canonical way to reserve memory for a dynamic array? When there are several slowly growing dynamical arrays I encountered severe performance drop (probably, they tried to overlap each other many times). Setting estimated length and navigating with extra counter inside each of

[fpc-pascal] Re: Hardware Access on x64 Linux

2008-07-08 Thread Csányi Pál
Vladimir Karpenko cr0acker-JGs/[EMAIL PROTECTED] writes: How can i access harware ports if there is no ports unit on Linux x64 port? There is a tutorial for Hardware Access here: http://wiki.lazarus.freepascal.org/Hardware_Access Well of course i read that, but there is no ports unit in x64

[fpc-pascal] Re: Ports unit on x64 Linux port.

2008-07-07 Thread Csányi Pál
Vladimir Karpenko cr0acker-JGs/[EMAIL PROTECTED] writes: How can i access harware ports if there is no ports unit on Linux x64 port? There is a tutorial for Hardware Access here: http://wiki.lazarus.freepascal.org/Hardware_Access -- Regards, Paul Csanyi

[fpc-pascal] Localized version of my application

2008-07-06 Thread Csányi Pál
Hello! I have installed Lazarus Version #: 0.9.25 beta Date: 2008-06-18 and FPC Version: 2.2.0 SVN Revision: 15441M i386-linux-gtk 2 (beta). I made a small project with Lazarus with one Frame, Buttons, Labels and StaticTexts. All these elements have English text as Caption. I wish to localize

Re: [fpc-pascal] Localized version of my application

2008-07-06 Thread Csányi Pál
Mattias Gaertner [EMAIL PROTECTED] writes: On Sun, 06 Jul 2008 16:11:48 +0200 [EMAIL PROTECTED] (Csányi Pál) wrote: I wish to localize this application to Hungarian language. tutorial I have now the project.po, project.mo, project.hu.po, project.hu.mo files. In this project I have

[fpc-pascal] Built in Query language (or abuse)

2008-06-03 Thread L
A creative idea: procedure Query(trick: Array of Const); begin for i:= CASE // interesting code here end; const SELECT = 1; // token WHERE = 2; // token FROM = 3; // token INSERT = 4; // token begin Query([SELECT, 'foo', FROM, 'bar']) Query([INSERT, INTO, 'bar',

[fpc-pascal] var r: record = () initialization

2008-05-30 Thread L
Consider local procedure scope stack records in MODE OBJFPC: procedure var R1: TSomeRecord = (); R2: TSomeRecord; procedure var O1: TSomeOldObject = (); O2: TSomeOldObject; In the case of R1 and O1, it seems the record's fields are initialized to zero, even though the fields are not

RE: [fpc-pascal] connection problem

2008-03-27 Thread l
to bugs.freepascal.org and svn.freepascal.org. [EMAIL PROTECTED]:~/temp svn co http://svn.freepascal.org/FPC/svn/lazarus/trunk l svn: requerimiento PROPFIND falló en '/FPC/svn/lazarus/trunk' svn: PROPFIND de '/FPC/svn/lazarus/trunk': 405 Method Not Allowed (http://svn.freepascal.org) [EMAIL PROTECTED

[fpc-pascal] Re: classes initialization

2008-03-25 Thread L
What about old borland objects (heap and stack initialization) process? I am guessing they are more like records... or do heap objects act like classes in that they are filled with zeros? p.s. I think the inconsistent behavior between local scope records and global scope records is kind of a

[fpc-pascal] Re: classes initialization

2008-03-25 Thread L
I wrote: What about old borland objects (heap and stack initialization) process? program test1; type trec = record i: integer; end; tclass = class i: integer; end; tobj = object i: integer; end; pobj = ^Tobj; procedure show; var rec: trec; c: tclass; o: tobj; po: pobj; begin

[fpc-pascal] Re: classes initialization

2008-03-25 Thread L
Using uninitialised variables is virtually always bad, regardless of the scope. And the fact that global variables are zeroed at the program start is afaik not defined by the Pascal standard. It's just a side effect of the way most operating systems work. I think something like: procedure

[fpc-pascal] Re: classes initialization

2008-03-25 Thread L
I wrote: I think something like: procedure test; var blah: integer = 0; begin end; Is useful.. i.e. initialized variables that are done on the spot. To expand on this.. not only local scope vars, but global.. var global: integer = 0; I agree is much clearer than leaving it to the

[fpc-pascal] Re: classes initialization

2008-03-25 Thread L
I wrote: 3. local class zeroed 4. global class zeroed I meant class instance zeroed (Regarding Jonas' nitpick ;-) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: classes initialization

2008-03-25 Thread L
Joao Morais replied to Jonas with: I think I didn't get your point. What about this piece of code: interface function foo: tfoo; implementation var _foo: tfoo; function foo: tfoo; begin if not assigned(_foo) then _foo := tfoo.create; result := _foo; end; Is it safe? What about this:

[fpc-pascal] Re: classes initialization

2008-03-25 Thread L
Pascal does not define any variable initialization itself - one should always init all Pascal vars of any type. Doing so is an excellent coding habit also portable to any other language/OS - protects against low-level implementation changes. I never trust a side effect I didn't code

[fpc-pascal] Initializing Records Automatically

2008-03-24 Thread L
http://stanleyxu2005.blogspot.com/2008/01/potential-memory-leak-by-initializing.html Interesting.. So with procedure InitRecord(out R; SizeOfRecord: Integer); begin FillChar(R, SizeOfRecord, #0); end; Even if it has dynamic array, ansistrings, shortstrings, integers, I assume it is okay to

[fpc-pascal] Re: Set ioresult

2008-03-24 Thread L
I wrote: and using fpFlock on windows. Typo: on unix ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: Initializing Records Automatically

2008-03-24 Thread L
Florian wrote.. Records and objects containing automated fields are initialized? Or do I miss something? Oh...? This is something I have never been clear about :-( So a record with an ansistring and an integer.. for example even local scope.. Will be all zeros? procedure test; var somerec:

[fpc-pascal] Re: Initializing Records Automatically

2008-03-24 Thread L
L wrote: Florian wrote.. Records and objects containing automated fields are initialized? Or do I miss something? Oh...? This is something I have never been clear about :-( p.s. see also: http://community.freepascal.org:1/bboards/message?message_id=223327forum_id=24082 So. let's

[fpc-pascal] compile DPR files

2008-03-24 Thread L
I think fpc compiler should compile .dpr files without having to type the extension.. me is lazy.. fpc prog this compiles prog.pp but doesn't do prog.dpr ;-) What do we think? I can supply patch and work on it if you think it is useful. p.s. I haven't checked, does fpc automatically compile

[fpc-pascal] Re: Initializing Records Automatically

2008-03-24 Thread L
I think confusion was created also because that guys blog post only had a record with one field in it (a string).. he should have used more fields with integers, pointers, etc to demonstrate a point more. ___ fpc-pascal maillist -

[fpc-pascal] Re: Initializing Records Automatically

2008-03-24 Thread L
One thing to ponder about: A class inside a record... trecord = record something: TSomeClass; int: integer; //... etc end; My brain hurts. This will cause issues with a Fillchar for the class, or not? I wouldn't use this normally (a class inside a record), but it is still interesting to

[fpc-pascal] classes initialization

2008-03-24 Thread L
Recently we discussed records and how to initialize them.. Jonas cleared up a lot for me (and Marco/Florian etc.). Thanks much.. So.. now I ask.. type something = class s: ansistring; int:integer end; Is int set to zero when it is a local scope var in a procedure created on the heap with

[fpc-pascal] Re: WSAGetLastError returns 0 when it shouldn't but I cannot see why

2008-02-28 Thread L
This seriously worries me, since I use threads extensively, and I mostly use call by value parameters. Bye -- Luca I use CONST parameters wherever possible for strings.. so that: 1) if I ever port the code to a DLL it is safer (can cast pchar in) 2) const is a stricter contract 3)

[fpc-pascal] Re: WSAGetLastError returns 0 when it shouldn't but I cannot see why

2008-02-27 Thread L
While using synapse in a thread, I saw that it didn't report an error on connection, eventually I saw that the call to WSAGetLastError was returning 0 even if it couldn't connect and the connect call returned an error. I am also working on this issue still. I had the WSAGetLastError

[fpc-pascal] Re: WSAGetLastError returns 0 when it shouldn't but I cannot see why

2008-02-27 Thread L
Luca wrote: I don't think that synapse is to blame[*]: my test program is also using the sockets unit directly, and stores SocketError (which just calls WSAGetLastError) in a variable. Found the problem using my brute force writeln('') skills. It is an issue with freepascal's stack or

[fpc-pascal] Re: WSAGetLastError returns 0 when it shouldn't but I cannot see why

2008-02-27 Thread L
L wrote: Luca wrote: I don't think that synapse is to blame[*]: my test program is also using the sockets unit directly, and stores SocketError (which just calls WSAGetLastError) in a variable. Found the problem using my brute force writeln('') skills. It is an issue with freepascal's

[fpc-pascal] Re: WSAGetLastError returns 0 when it shouldn't but I cannot see why

2008-02-27 Thread L
L wrote: Aha.. I changed the by Value parameter to a CONST parameter in the error procedure (Perror).. And this solves the issue.. So something to do with calling by Value within a thread versus a const (pointer?). I will attach the problem in the bug report previously opened if I can

[fpc-pascal] Re: Interfacing with the free pascal compiler ?

2008-02-12 Thread L
also FPC doesn't support the USES unitname AT path/unitname.pas construction, Delphi can't manage exported variables from dynamic linking modules (DLL, so, dylib...) but FPC does it, etc. FPC supports: uses unit1 in ../foo/bar/somefile.pas; I am using this so I don't have to ship FPC

[fpc-pascal] fpmake - append compiler options

2008-01-26 Thread L
Using fpmake, how does one append a compiler option like -dSOMEDEFINE Or -xxSomeOptionNotIntegratedYet I will put this info in the FPMAKE wiki page if it is possible to do. Regards, L505 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] fpmake - compiled unit cleaning

2008-01-26 Thread L
Michael wrote: 3 ways: Thanks.. added compiler option info to the fpmake wiki page. Now I'm wondering..when I use fpmake clean it doesn't clean any units that were compiled implicitly.. i.e. units that were not called in with AddUnit, but compiled because they were in uses clause of units.

[fpc-pascal] Re: FCL-DB/SQLDB docs started

2007-11-27 Thread L
Where do I get a Doc ID to edit those pages? The current doc id is -lufdocz- including dashes. We'd be happy if you helped.. there is also the tiOPF page that I opened.. There are loads of spelling and grammar mistakes I would like to fix. Oh btw, 'Remember' is still spelled incorrectly

[fpc-pascal] Delphi + FPC + HTTP + Magic = ?

2007-11-25 Thread L
How to target linux, bsd, and cPanel with Delphi on Windows.. using magic.. http://z505.com/videos/d5/linux-delphi-webapp.htm Mirror: http://iknow.z505.com/vid/linux-delphi-webapp.htm Maybe a friend/competitor to the CrossFPC project. But with more of a focus on server, web development, and

[fpc-pascal] FCL-DB/SQLDB docs started

2007-11-25 Thread L
Leonardo and I have been working on structuring together some notes and docs for fcl-db and sqldb. I am not as experienced with sqldb yet but as I have more time there will be more notes added. http://z505.com/cgi-bin/powtils/docs/1.6/idx.cgi?file=fcldbnotes An interface view is also available:

Re: [fpc-pascal] PCRE

2007-11-07 Thread L
Doing a dumb header port is not that hard. If you can't do it, start making tests, and I'll do it. L505 loves flamebaits. They are what I eat for breakfast. I personally like to spend my time doing useful things, and if someone has already made the translation then I'm not going to waste time

Re: [fpc-pascal] Faster fannkuch?

2007-11-07 Thread L
Under windoze, I've found that programs take longer to run the first time they are executed after recompilation. Is Linux the same way? This may have something to do with certain code/data being cached.. I'm not sure what since a console program doesn't use many DLL's.. It must cache the exe

Re: [fpc-pascal] regex-dna using PCRE

2007-11-07 Thread L
Unfortunately, it's slightly slower than my fastest program that uses the library that comes with FPC. I wonder if the dll was compiled with all of the C compiler's optimiaztions turned on. May have to make an .O file.. For example static linking.. instead of dynamic. AFAIK one can link

Re: [fpc-pascal] PCRE

2007-11-07 Thread L
Doing a dumb header port is not that hard. If you can't do it, start making tests, and I'll do it. (skip nonsense stuff) No, not nonsense. Jeff P. (yetanothergeek) had a header for freepascal not using any JCL, AFAIK. Which is the original link I provided, which wasn't working. Which

Re: [fpc-pascal] FPC now 3rd in shootout

2007-11-06 Thread L
There has been a long discussion on the Shootout forums about it. Isaac believes that it is more fair this way for languages that don't have all benchmarks implemented. Now we simply have to make him retract all our poor performing programs :) Exactly. A not very fast language can

Re: [fpc-pascal] FPC now 3rd in shootout

2007-11-06 Thread L
The compiler uses shortstrings internally, which are the fastest string type. Pchars are between ansistrings and strings, but offer the least comfort of all. Also WordString or LongIntString would be as fast or faster than a 255 Bytestring.. But haven't implemented or supplied a patch yet ;-)

Re: [fpc-pascal] FPC now 3rd in shootout

2007-11-06 Thread L
The C program in the shootout uses pcre (Perl-compatible regular expressions). It would be very nice if FPC came with pcre. I am also looking to ship PCRE with Powtils too since TRegexp isn't the best in all situations. We wrapped Tregexp too:

[fpc-pascal] PCRE

2007-11-06 Thread L
I tried: http://www.hotlinkfiles.com/files/526004_qpvr0/pcre-fpc.tar.gz Can't get it to work. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fast text processing

2007-11-01 Thread L
No more strlen: http://www.hu.freepascal.org/fpcircbot/cgipastebin?msgid=1432 This doesn't work if you have spaces in front of the tags sometag sometag I'm not sure if the Perl one fails too though. I don't have perl installed and can't test it ;-) A real parser doesn't

[fpc-pascal] Sponsor/Dontation button

2007-11-01 Thread L
On the main site, will there ever be a sponsor/donation button that is extremely easy to click and use? Because anyone with guts who uses FPC and anyone worth their salt would click it and send something for sure. Weaklings of course would not. But we aren't all. I realize contributing code is

Re: [fpc-pascal] fast text processing

2007-10-31 Thread L
Well, considering that perl's or Python's speed greatly rely on the underlying C-implementation of (at least) particular functionality, all those comparisons basically boil down to C vs. C, anyway. Or don't they? Exactly! That's why I prefer to use fpc own regexpr unit. :) -Bee-

Re: [fpc-pascal] fast text processing

2007-10-31 Thread L
Word count: 126944 Unique word count: 11793 real0m0.281s user0m0.244s sys 0m0.016s Can someone do a test for 5 minutes of parsing and see if things slow down or speed up for one of the programs? That takes away process load time too.. example: the time it takes to fork

Re: [fpc-pascal] fast text processing

2007-10-31 Thread L
Word count: 126944 Unique word count: 11793 real0m0.281s user0m0.244s sys 0m0.016s Can someone do a test for 5 minutes of parsing Rather I mean can someone do a more realistic test such as parsing 1500 files instead of one single file. At least in my line of

Re: [fpc-pascal] Speed

2007-10-30 Thread L
Here's one: profile your code! And where can you read how to do that? VALGRIND ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Speed

2007-10-30 Thread L
I think first code is faster than second, because in first code SubCalculate function is in calling function body? Actually some times local scope functions are slower because the variables need to be carried around since you are doing somewhat of a lexical closure. The local scope function

Re: [fpc-pascal] Speed

2007-10-30 Thread L
P.S. Where i can read tips about writing fast FP code? Also see some of the fastcode projects: http://www.fastcode.dk/fastcodeproject/fastcodeproject/index.htm And I'm sure you know you can always use GOTO statements when you really need speed out of loops :) (not always, only if

Re: [fpc-pascal] Speed

2007-10-30 Thread L
I hear the Intel C compilers and Fortran compilers and Ada compilers are better optimized for certain things since FPC/delphi are generally desinged for GUI programming. ;-) C/Fortran yes, Ada no; there exists no Intel Ada compiler. It is also false that FPC is slow because it has been

Re: [fpc-pascal] Speed

2007-10-30 Thread L
If the code is more efficient with a goto, this is sufficient to justify its use. Or if the code is clearer, for example to avoid deep nesting... Or to make clean errors and debugging log files easier: exit; .// default //else error1: begin debugln('error1'); exit; end; error2 begin

Re: [fpc-pascal] fast text processing

2007-10-30 Thread L
Hi all, I had never used Perl before. Until someone showed me Perl is very fast for text processing (using its powerful regex), despite it's an interpreted language. It even beat Delphi and FPC though both are compiled language. A few lines Perl program almost two times faster than a few

Re: [fpc-pascal] FPC and JAVA

2007-10-29 Thread L
Also, all those icons in the menus look pretty weird (very few Mac apps have that, and none that I currently use does), Also, on Windows I found the spacing was a bit big but not sure if this is normal MS OFfice style look and feel since I don't use that software much. For example it looks

Re: [fpc-pascal] Re: Why this evaluates on if wrong ?

2007-10-29 Thread L
It's just one more funny thing one must realize, when comparing real numbers with some exact real constants. After this, I will try to never compare doubles directly, but using tricks like above. Because, in this digital world 1 + 0.4 - 0.4 1. My opinion: This is ludicrous. The end user

Re: [fpc-pascal] Re: Why this evaluates on if wrong ?

2007-10-29 Thread L
The programmer definitely should care. He has to make the right choice in what type he chooses, so he must be aware of any 'quircks' of the type he is using, and that includes how things are rounded and how they are stored in memory. That's why there are IEEE references for this. It's his

Re: [fpc-pascal] Re: Why this evaluates on if wrong ?

2007-10-29 Thread L
Your Casio doesn't do comparisons. Just round to 10 digits before you compare and it'll work just as fine as on your Casio. Daniël And some off topic trivia: My casio says 10 + 2 digits near the model number. Does this mean it displays 10 digits and stores 2 in the background, or that I

Re: [fpc-pascal] Re: Why this evaluates on if wrong ?

2007-10-29 Thread L
The end user is using a high level language and should not care whether the computer is digital or analog. Unfortunately, there is a problem. One can try to hide it (as calculators attempt to do), but in the longer run that is going to be unsuccessful and even dangerous. Same as

Re: [fpc-pascal] Re: Why this evaluates on if wrong ?

2007-10-29 Thread L
Same as ansistring.. it can be dangerous to hide all the intricate details of a pchar/bytearray, which is what ansistring does. But ansistrings are really useful for 'every day' use. Wrong. A string can be represented alphadequate, as it is called; an ansistring can handle any string you

Re: [fpc-pascal] Why this evaluates on if wrong ?

2007-10-28 Thread L
If you do on a hand calculator: 1/3 ... you will see: 0.333 If you multiply again with 3, you will see: 0.999 ... and not 1.000. On my electronic/digital calculator I see '1' It is a casio fx-300SA Maybe $5 digital calculators are smarter

Re: [fpc-pascal] Why this evaluates on if wrong ?

2007-10-28 Thread L
Regarding the $3000 computer: An extended has 20 digits of precision. Make sure you round your output to 10 digits and you need to a very weird calcation until you can see a rounding difference :) I was talking about $3000 pascal dollars: BEGIN writeln($3000); END. Output: 12288 The

Re: [fpc-pascal] Dynamic linking variables

2007-10-26 Thread L
You cannot do this with a single construct; You need a pointer in the case of a dynamically loaded library. I'm not sure that I understand. can you please point me to an example ? He means it depends on whether you are using: DLL bound dynamically at program runtime DLL bound statically at

[fpc-pascal] Re: PasWiki for download?

2007-10-25 Thread L
Graeme wrote: I started with a MarkDown syntax parser (mostly code snippets at the moment). I'd like to abstract it as a class which can then be used in other projects as well. Things like CGI apps or fpdoc's description files. eg: Editing the documentation in Lazde (or fpGUI's doceditor)

Re: [fpc-pascal] Run process and exit (win32)

2007-10-23 Thread L
Hi, I'm trying to start a Win32 process and exit leaving the process executing. The test scenario is a CGI calling a simple Http server (the Synapse Http server demo). I have done this before but it has been months and I forget exactly what I did. Something like this below: program

[fpc-pascal] Re: PasWiki for download?

2007-10-23 Thread L
Hi, Any ideas when (or if) PasWiki will be released to the public? I know about the Simple CMS downloads, but don't feel the urge to rewrite it into a full fledged wiki server with syntax parsing only to find PasWiki already does all that and could be released before I complete my wiki

Re: [fpc-pascal] Run process and exit (win32)

2007-10-23 Thread L
Thanks L, do you know if I ShellExecute can create a process without showing the command window? I'm sure you can hide it.. just a matter of finding the right Windows API paramaters.. Probably something like.. SW_HIDE Not tested, not sure

Re: [fpc-pascal] Run process and exit (win32)

2007-10-23 Thread L
Thanks L, do you know if I ShellExecute can create a process without showing the command window? I'm sure you can hide it.. just a matter of finding the right Windows API paramaters.. Probably something like.. SW_HIDEy Not tested, not sure. ;-) Actually, maybe cmd /c will help you

Re: [fpc-pascal] Run process and exit (win32)

2007-10-23 Thread L
Have you tested this simple way of doing it below program test; {$mode objfpc} {$H+} uses windows; begin ShellExecute(0 , 'open', 'notepad', nil, nil, SW_SHOWNORMAL) ; ShellExecute(0 , 'open', 'notepad', nil, nil, SW_HIDE) ; end. The cmd /k may not even be needed... and it may not even work

[fpc-pascal] Socket x SSocket

2007-10-21 Thread F x L
Hi. I'm getting a warning error in program with a new FPC 2.2.0 because the socket library was obsolete. The recomended option is ssocket library but I did'nt find this documentation. Could you help me ? Thanks, FxL _ Conheça o

[fpc-pascal] Re:The Interface to MySQL has changed on version by version Andi Purwito

2007-10-09 Thread L
mysqlku.pas(16,18) Error: Identifier not found TMYSQL mysqlku.pas(16,18) Error: Error in type definition mysqlku.pas(18,22) Error: Identifier not found TMYSQL_ROW mysqlku.pas(18,22) Error: Error in type definition mysqlku.pas(74,17) Error: Operator is not overloaded mysqlku.pas(76,32)

[fpc-pascal] Re: Contrib Section Spam

2007-07-23 Thread L
Thanks Jonas for cleaning it up, looks much better. However, what the heck? I just found another one today: http://freepascal.org/contrib/delete.php3?ID=2481 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] Contrib Section Spam

2007-07-22 Thread L
http://freepascal.org/contrib/db.php3?category=Miscellaneous Someone should lock off that section of the website.. temporarily. It is getting spammed and filling up the database fast. Maybe just temporarily lock it off and keep the other sections open (i.e. do not allow posting). The sections

Re: [fpc-pascal] splitting string into array

2007-07-11 Thread L
Marc Santhoff wrote: Hi, is there any function in the libraries of fpc for splitting a string into an array naming the separator? There is a function in the substrings.pas unit included in this package: http://z505.com/cgi-bin/powtils/docs/1.6/idx.cgi?file=substrsplitunit=substrings And

Re: [fpc-pascal] splitting string into array

2007-07-11 Thread L
Wouldn't this function be a candidate for crawling into the 'strutils' unit? Probably, but I would change the interface: function Split(const str: string; const separator: string; var Res : array of string) : Integer; So the function returns the number of elements in the array.

[fpc-pascal] Re: html link extractor

2007-07-03 Thread L
Is there a unit somewhere that can extract links from html pages? I want to be able to recursively add pages to a chm archive. I created a program called GetLinks in a couple minutes: Updated the files and changed the htmlutil functions a bit. Also, created a recursive example that uses

[fpc-pascal] Re: html link extractor

2007-07-02 Thread L
Andrew Haines wrote: Is there a unit somewhere that can extract links from html pages? I want to be able to recursively add pages to a chm archive. I created a program called GetLinks in a couple minutes: http://opensvn.csie.org/pspcgi/general-utilities/parser/html/demo/getlinks.pas Latest

[fpc-pascal] Re: Interesting namespace question

2007-06-24 Thread L
Ido wrote: I saw an interesting bug on C++, and I was wondering how to solve this type of bug in Pascal: {$MODE OBJFPC} program namespace_test; function test : boolean; begin result := true; end; type TTest = class function test : boolean; end; function TTest.test :

[fpc-pascal] Re: Interesting namespace question

2007-06-24 Thread L
A program doesn't have a namespace that one can access, AFAIK (someone care to correct?). Note to self: Actually it does, as mentioned in another email from IK. i.e. program1.test var // initialized record NameSpace: TNameSpace(test: @test); I meant: NameSpace: TNameSpace =

[fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-17 Thread L
Adrian Wrote: no - that was not the problem. I have my linux running in a coLinux session and it seems that the linker fails, when the file is in a windows drive, even as root. other programms don't have problems to read or write to this drive. but there is still a strange problem with the

[fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-17 Thread L
Adrian Wrote: no - that was not the problem. I have my linux running in a coLinux session and it seems that the linker fails, when the file is in a windows drive, even as root. other programms don't have problems to read or write to this drive. but there is still a strange problem

[fpc-pascal] Re: library initialization and deinitialization

2007-06-17 Thread L
I've got a shared library (.so) I wrote in C, with initialization and finalization code declared by using the GCC attributes constructor and destructor. These init and fini functions simply print out start and stop to stdout. The .so exports one function, which prints out Hello. I've got a

[fpc-pascal] Re: Question about some units

2007-06-17 Thread L
Test writes: I have a source file (test.pp) that uses some units. Where can I get those units? If you didn't notice, I am a newbie :) I tried to compile but it obviously drops an error. uses cgiapp, unix, unixutils, classes, inifiles FPC compiler comes with compiled .a/.ppu/.o files

[fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-17 Thread L
I know, programs with a writeln() have lower performance, but I think, printf() and writeln() must do the same. This need time to calculate. You have to explain problem more. The key thing to do is find your bottleneck. Write some benchmarks for float to string conversions and put them in a

[fpc-pascal] Success: Doom2Freepascal 2.1.4

2007-05-20 Thread L
Dear friends, I compiled the famous DOOM game with FPC 2.1.4 and it works better now. Had to make minor syntax modifications to compile it with 2.1.4. http://z505.com/cgi-bin/qkcont/qkcont.cgi?p=Doom-To-Freepascal http://z505.com/pascal/games/doom2fpc-2.1.4.zip Now compiling with 2.1.4 it seems

[fpc-pascal] Freepascal Web Compiler

2007-04-21 Thread L
Hello, Just for your information.. I have created a small video showing a web based FPC compiler in action. http://z505.com/videos/pwu/webcmd/webcmd-fpc-demo1.htm The source code to this demo will be posted on Z505.com and the psp.furtopia.com site soon. This is the first step in making our

[fpc-pascal] Re: (fw) PWU installation question

2007-01-04 Thread L
On my debian system I place it anywhere - we haven't decided on an official location - however for ease of typing in your fpc.cfg search path or IDE search path it will be good to place it in a terse or short directory such as /etc/pwu-1.6.0.0/ instead of something like

Re: [fpc-pascal] Linux library access violation

2006-10-29 Thread L
int testreturn(const char *thename, char *rcity, char *rstate) { memcpy (rcity,Boston,7); memcpy (rstate,Massachusetts,14); return strlen(thename); } First thing to check is it declared CDECL or STDCALL in the C library? I click OK and its fine. It returns everything

[fpc-pascal] Recursive unit search path

2006-04-19 Thread L
-Fu/home/me/project1/units/*.* No such thing for FPC, right? Recursive units searches? Could be useful, but dangerous if directories contain different versions of the source file in different places. Still, in many projects I get sick of continually adding new directories to the search path -

Re: [fpc-pascal] Scripting in FPC

2006-02-08 Thread L
HI, FPC is compiled only Alain There are some scripting systems out there, RemObjects which I think Boguslaw was working on completing the latest version? There is another one that I think costs money, and maybe a few on TOrry.net which could be converted from Delphi to FPC.

[fpc-pascal] Build date stamp

2006-01-30 Thread L
Any way to put a date stamp into a binary that is compiled? I don't see a predefined symbol available. Any ideas or suggestions. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Quake 2 for Freepascal

2005-12-19 Thread L
Doesn´t the demonstration Quake 2 work? This is the case for many games, like Doom for Pascal. I need to test the latest patched Quake 2 v3.21, because the demo is older, v3.14 I think. The game runs on the demo, but it tells me I'm missing a Plaque - or something. So I think this is in

Re: [fpc-pascal] Download file

2005-11-18 Thread L
It does not work as is on Mac, but then, most people don't care. *cry* rant flamebait offtopic I would consider a Mac if they didn't weld them shut like those iMacs. Talk about closed source hardware. Of course for every complaint I make someone will come back with but you can buy Macs

[fpc-pascal] Speed question for strings

2005-11-18 Thread L
Why is the first and third example *so* much faster than the second example? Significantly faster. There's really not that much difference between the string concatenation. //Example 1: (seems fast) function StrLoadFile_test1(FileName: string): string; var F: text; c: char; str1,Line:

Re: [fpc-pascal] How to make a binding or wrapper ?

2005-11-16 Thread L
Hi, I'm making an application but to have it work like I want I need to make a binding or a wrapper (is there a diiference ?) to some external software. Are there documents that can be used to learn how to do this ? Your proposition is to general for us to help. Almost everything in software is

Re: [fpc-pascal]IPC Question

2003-09-03 Thread L D Blake
Terminated strings. -- Best regards, L D Blake ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]About order of units...

2003-08-31 Thread L D Blake
on a couple of header files from the SDK... It created a file just like the examples I gave you... bytes, words, longwords... all replaced by LongInt. - L D Blake ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo

Re: [fpc-pascal]About order of units...

2003-08-31 Thread L D Blake
to me that whoever did the conversion didn't check very carefully. - L D Blake ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]About order of units...

2003-08-31 Thread L D Blake
an antique. Anyone who'd be willing to take this on can contact me privately as [EMAIL PROTECTED] and we can at least discuss the idea. - L D Blake ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc

Re: [fpc-pascal]About order of units...

2003-08-31 Thread L D Blake
, which is what Pascal is supposed to be all about. It's strength is in it's rigid error checking. - L D Blake ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]About order of units...

2003-08-31 Thread L D Blake
of the problems... I might actually be running afoul of my pop-up killer by trying to open two ie windows at once ... now wouldn't that be a laugh! Can anyone confirm if IE would be involved when playing midi, wmi, wave, and mp3 audio files? - L D Blake

  1   2   >