Re: [fpc-pascal] Convert unix timestamp to TDateTime

2011-11-18 Thread José Mejuto
Hello FPC-Pascal, Friday, November 18, 2011, 1:54:13 PM, you wrote: SGI would like to convert a unix timestamp to TDateTime taking into SG account timezone and daylight savings. For example, timestamp: SG 1308666350 should be converted to: 2011/06/21 16:25:50, assuming GMT+1 SG timezone in

Re[2]: [fpc-pascal] using exceptions

2012-01-04 Thread José Mejuto
Hello FPC-Pascal, Wednesday, January 4, 2012, 1:31:01 AM, you wrote: MD Very interesting and I agree when he say: MD I think the reason programmers in C/C++/Java style languages have MD been attracted to exceptions is simply because the syntax does not MD have a concise way to call a function

Re: [fpc-pascal] Editing resource of executable

2012-08-31 Thread José Mejuto
El 31/08/2012 17:48, waldo kitty escribió: i think i know what you are asking for and my thought actually matches what mark loyd seemed to be saying... with that in mind, i remember reading about some sort of resource editor to allow editing of resources in a binary... it was posted in this

Re: [fpc-pascal] what happened to the contributed units listing?

2013-02-07 Thread José Mejuto
El 07/02/2013 2:27, Michalis Kamburelis escribió: It's on http://www.freepascal.org/contrib/contribs.html now. But some pages may still contain old links, see http://bugs.freepascal.org/view.php?id=23769 . Hello, Please, add some kind of notification that the page (and maybe others) need

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-12 Thread José Mejuto
El 12/02/2013 13:29, Giuliano Colla escribió: My conclusion is that one can't properly handle INI files with just a try..finally construct, as all examples show, because a possible error will propagate outside the construct, with unpredictable effects (in this case the FormClose procedure

[fpc-pascal] Result: string

2013-03-04 Thread José Mejuto
Hello, What's the expected output of this code ? function TheA(): string; begin Result:=Result+'A'; end; writeln(TheA()); I thought that when the result type is an automated one its value gets initialized... Maybe I'm wrong... -- ___

Re: [fpc-pascal] Result: string

2013-03-04 Thread José Mejuto
El 04/03/2013 22:16, Michael Van Canneyt escribió: That report says the issue was assigned to Jonas and fixed in revision 20427 (ver 2.6.1). I find the current release (2.6.2) initialises a string function result to EmptyStr as you would hope. [...] Prints AA Hello, I'm asking because

Re: [fpc-pascal] Result: string

2013-03-05 Thread José Mejuto
El 05/03/2013 11:23, Howard Page-Clark escribió: The code that makes me wonder something is wrong is this one: [...] For me (win32, FPC 2.6.2) the output is identical (= A) whether or not Result in TheA() is initialised manually or not. Perhaps 2.7.1 has a regression here if it differs for

Re: [fpc-pascal] Result: string

2013-03-06 Thread José Mejuto
El 06/03/2013 10:40, Jonas Maebe escribió: FPC 2.6.2 does give a warning (code is from http://bugs.freepascal.org/view.php?id=20907#c55064 ): [...] It could also fail in 2.6.x, just less often. Hello, 2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but with this one 2.6.0,

Re: [fpc-pascal] Result: string

2013-03-06 Thread José Mejuto
El 06/03/2013 13:47, Jonas Maebe escribió: 2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but with this one 2.6.0, and 2.7.1 trunk does not generate it (I do not have 2.6.2 to test): That's because you are passing an uninitialized value to a var-parameter. That only generates

Re: [fpc-pascal] Result: string

2013-03-06 Thread José Mejuto
El 06/03/2013 13:47, Jonas Maebe escribió: 2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but with this one 2.6.0, and 2.7.1 trunk does not generate it (I do not have 2.6.2 to test): That's because you are passing an uninitialized value to a var-parameter. That only generates

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-07 Thread José Mejuto
El 07/03/2013 12:29, Joao Morais escribió: Hello list, what's the problem with RoundThree procedure (below)? Here it raises a sigsegv trying to read an internal field. The difference from RoundTwo is that I create an implementation of the interface within the first param of tinterfacedlist.add

Re: [fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

2013-03-27 Thread José Mejuto
El 27/03/2013 19:22, Michalis Kamburelis escribió: Google found an old thread on lazarus mailing list about this (FPC, gzip and stream) but without any solution, everything mentioned there has either the limitations of TCompressionStream/TDecompressionStream (no gzip format) or TGZFileStream

Re: [fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

2013-03-28 Thread José Mejuto
El 28/03/2013 1:06, Ewald escribió: Google found an old thread on lazarus mailing list about this (FPC, gzip and stream) but without any solution, everything mentioned there has either the limitations of TCompressionStream/TDecompressionStream (no gzip format) or TGZFileStream (not able to work

Re: [fpc-pascal] Same code from LCL project throw error in console application

2013-04-16 Thread José Mejuto
El 16/04/2013 21:23, Krzysztof escribió: Hi, I have strange issue. Simple mpg123 player which work fine on LCL project, on console application throw floating error in line mh_e := mpg123_read(mh, @outbuf[0], buffer_size, done); Hello, I'm not sure but I think that the GTK2 Widgetset disables

Re: [fpc-pascal] Same code from LCL project throw error in console application

2013-04-17 Thread José Mejuto
El 16/04/2013 22:46, Krzysztof escribió: Thanks! exInvalidOp exception mask solved problem. But I don't understand. Same error I had in fpGUI project. fpGUI interface doesn't use GTK, QT etc, it drawing over pure X11 so how it is possible that application catch GTK errors? Hello, Almost any

Re: [fpc-pascal] FPC 2.6.2 throws SEGV in fpc_AnsiStr_Decr_Ref(). How is this possible?

2013-05-09 Thread José Mejuto
El 09/05/2013 5:19, Bruce Tulloch escribió: If there is no other explanation, then it means I need to find out how the string variable referred to by (%eax) could have been been accessed (or even known to exist) by any other thread in the same address space.-- Hello, In the past I had

Re: [fpc-pascal] tstringlist.savetostream

2010-03-16 Thread José Mejuto
Hello FPC-Pascal, Tuesday, March 16, 2010, 2:53:44 AM, you wrote: TAH After running tstringlist.savetostream how can I make sure that the TAH buffer has been flushed and data sent successfully? If the call returns everything has been saved, if not an exception should happend, but you can not

Re: [fpc-pascal] More memory leaks and other problems: request for review of probably stupid mistake

2010-03-31 Thread José Mejuto
Hello FPC-Pascal, Wednesday, March 31, 2010, 7:52:43 PM, you wrote: J I'm trying to learn FreePascal by writing a file indexer a la locate and J I'm hitting more walls after receiving quick and clear help from Michael J Van Canneyt regarding memory leaks. [...] J Call trace for block

Re: [fpc-pascal] Initializing a record-type variable to get rid of the false-positive compiler hint

2010-04-14 Thread José Mejuto
Hello FPC-Pascal, Wednesday, April 14, 2010, 5:13:51 PM, you wrote: BA Supposing I have a record-type variable, could someone here BA tell me how to initialize it properly so that FPC could notice the BA initialization, since the FillByte() and FillChar() way do not BA cause FPC aware of it?

Re[2]: [fpc-pascal] Initializing a record-type variable to get rid of the false-positive compiler hint

2010-04-15 Thread José Mejuto
Hello FPC-Pascal, Thursday, April 15, 2010, 6:43:41 AM, you wrote: BA Thanks for your reply José, but what is the philosophy behind BA the solution? and What are the reasons for $PUSH and $POP? Also, I BA tried to remove the $HINTS directive, and it worked fine without BA it. Could you explain

[fpc-pascal] Published - Public

2010-04-15 Thread José Mejuto
Hello FPC-Pascal, If I have a class like: TMyClassPublished=class(TObject) published procedure MyProcedure; virtual; end; And a derived one: TMyClassDerived=class(TMyClassPublished) public procedure MyProcedure; override; end; Is there any difference in the derived one with less

Re[2]: [fpc-pascal] Published - Public

2010-04-15 Thread José Mejuto
Hello FPC-Pascal, Thursday, April 15, 2010, 11:57:01 PM, you wrote: TMyClassPublished=class(TObject) published procedure MyProcedure; virtual; end; And a derived one: TMyClassDerived=class(TMyClassPublished) public procedure MyProcedure; override; end; Is there any difference in

Re[4]: [fpc-pascal] Published - Public

2010-04-16 Thread José Mejuto
Hello FPC-Pascal, Friday, April 16, 2010, 8:42:32 AM, you wrote: ZD What useful for put procedure in Publish? I do not know :-? I'll ask in the Lazarus list. -- Best regards, José ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re[6]: [fpc-pascal] Published - Public

2010-04-16 Thread José Mejuto
Hello FPC-Pascal, Friday, April 16, 2010, 9:06:45 PM, you wrote: FE Published methods can be found with TObject.MethodAddress, that's how FE the lfm hook event handlers (and why Form event handlers are FE published). Yes, but thats for streamable objects like TForm, or any component, but I

Re[2]: [fpc-pascal] dynamic array contents and system.move

2010-04-25 Thread José Mejuto
Hello FPC-Pascal, Sunday, April 25, 2010, 6:29:26 PM, you wrote: I think there is a great difference between normal arrays and dynamic ones JH Yes, but it should not be like that. If you first declare a JH static array and then decide to make it a dynamic array then *no* JH code change should

Re: [fpc-pascal] How to convert ISO format string in FreePascal

2010-04-27 Thread José Mejuto
Hello FPC-Pascal, Tuesday, April 27, 2010, 5:43:30 PM, you wrote: FC I switched to using the unixtime value which is also present in the FC records I am using, but it does not allow for Daylight Savings Time FC and is currently an hour behind. Is there some way the FreePascal FC libraries can

Re[2]: [fpc-pascal] dynamic array contents and system.move

2010-05-04 Thread José Mejuto
Hello FPC-Pascal, Tuesday, May 4, 2010, 9:41:27 PM, you wrote: M I have never found anything that says, that an array (not a M static-array, just an array), always and under any circumstances must M ensure that the identifier of the whole array is equal to the first M data-element in the array?

Re[2]: [fpc-pascal] dynamic array contents and system.move

2010-05-05 Thread José Mejuto
Hello FPC-Pascal, Wednesday, May 5, 2010, 8:54:01 AM, you wrote: architectures. Much better would be move (array1[0],array2[0],elements*sizeof(element)) but even in this case the result is undefined, but it is a bit more exact as the programmer GG Now this is a perfect example, of why I love

Re[2]: [fpc-pascal] dynamic array contents and system.move

2010-05-05 Thread José Mejuto
Hello FPC-Pascal, Wednesday, May 5, 2010, 10:49:24 AM, you wrote: In computer science, an array data structure or simply array is a data structure consisting of a collection of elements (values or variables) [...] s ??? s What does this mean? As far as I know, variable in CS can s have 3

Re[2]: [fpc-pascal] How to convert ISO format string in FreePascal

2010-05-05 Thread José Mejuto
Hello FPC-Pascal, Wednesday, May 5, 2010, 11:23:42 PM, you wrote: FC Is the an LCL routine that can get the timezone from the computer on both FC Windows and Linux? None of the examples mention a way of getting the FC computer's time zone. Usually you will have an environment variable TZ, but

Re[2]: [fpc-pascal] about dynamic array

2010-05-06 Thread José Mejuto
Hello FPC-Pascal, Thursday, May 6, 2010, 3:53:59 PM, you wrote: c TList wraps TFPList, which is based internally on an array. So access c is fast; insertion, deletion not. But it is faster than inserting elements in a dynamic array (unless reference counted ones) because it usually moves less

Re[2]: [fpc-pascal] Where is the best place to declare an array?

2010-05-06 Thread José Mejuto
Hello FPC-Pascal, Thursday, May 6, 2010, 7:12:46 PM, you wrote: If I remember this correctly, I've formerly ever read somewhere (in my Delphi days) that array should be declared globally (not inside a function or procedure) so that access to the array will be faster. Is this correct? No.

Re[2]: [fpc-pascal] about dynamic array

2010-05-06 Thread José Mejuto
Hello FPC-Pascal, Thursday, May 6, 2010, 8:58:33 PM, you wrote: faster in fact. If the user plans to use a record (which is my suspect) with TList he must new and dispose the elements and he will end up with a dyn array of pointers after all, which is a TList. FK A dyn. array of records

Re[2]: [fpc-pascal] about dynamic array

2010-05-06 Thread José Mejuto
Hello FPC-Pascal, Thursday, May 6, 2010, 9:50:34 PM, you wrote: DC The short answer is because you have not set p2 to nil as you did to p1. I do not want to be rude but, do you read all the message ? I was trying to be ironic, but seems that I was unable maybe due my very limited english,

Re[4]: [fpc-pascal] about dynamic array

2010-05-08 Thread José Mejuto
Hello FPC-Pascal, Saturday, May 8, 2010, 1:26:09 PM, you wrote: But it is faster than inserting elements in a dynamic array (unless reference counted ones) because it usually moves less amount of data (4/8 bytes per element). VH Implementing a dynamic array via a list implementation which VH

Re[6]: [fpc-pascal] about dynamic array

2010-05-08 Thread José Mejuto
Hello FPC-Pascal, Saturday, May 8, 2010, 5:07:12 PM, you wrote: JM And depending on the usage patterns and the size of the JM elements stored in the array, it probably can be. That's all he JM was saying, and only as a side remark in the context of the JM discussion (which was meanly to steer

Re[6]: [fpc-pascal] about dynamic array

2010-05-08 Thread José Mejuto
Hello FPC-Pascal, Saturday, May 8, 2010, 4:42:46 PM, you wrote: VH So, apart from a possibly more optimized implementation (like VH not changing the allocated memory size on each single VH insertion/deletion) how do you come up with the idea that adding VH another layer would make it faster?

Re[8]: [fpc-pascal] about dynamic array

2010-05-09 Thread José Mejuto
Hello FPC-Pascal, Sunday, May 9, 2010, 1:40:33 PM, you wrote: Thank you, at least one catch my whole idea about when TList can be faster that dynamic array or a plain GetMem for the array. VH Well, you didn't say can previously, you said it is VH faster. That's quite a difference. Ok, you are

Re[8]: [fpc-pascal] about dynamic array

2010-05-09 Thread José Mejuto
Hello FPC-Pascal, Sunday, May 9, 2010, 1:51:20 PM, you wrote: VH Well, according to this, the dynamic array performs slightly VH faster in many cases (which is supporting my previously expressed VH doubts, isn't it?). Of course, with the above-mentioned cost of VH keeping track of the data

Re[2]: [fpc-pascal] about dynamic array

2010-05-09 Thread José Mejuto
Hello FPC-Pascal, Sunday, May 9, 2010, 8:04:24 PM, you wrote: s Sorry to have launched such an argument by starting a new s thread about dynamic array. My purpose, as a newcomer discovering s the world of fpc, was just to get information I could not find s myself to help me and progress in the

Re[2]: [fpc-pascal] TAP-Win32

2010-05-13 Thread José Mejuto
Hello FPC-Pascal, Thursday, May 13, 2010, 10:42:37 PM, you wrote: JAGdFJ Handle := CreateFile(PChar(TAP_Device), GENERIC_READ Or JAGdFJ GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM Or JAGdFJ FILE_FLAG_OVERLAPPED, 0); Try using: Handle:=CreateFileA(PChar(TAP_Device),

Re[4]: [fpc-pascal] TAP-Win32

2010-05-13 Thread José Mejuto
Hello FPC-Pascal, Friday, May 14, 2010, 12:14:31 AM, you wrote: JAGdFJ This is the C# example i found : JAGdFJ http://www.varsanofiev.com/inside/TunTest.cs Also this line is wrong IMHO: TAP_Device = '.\\Global\\{44F7688F-77FA-43DC-8D8F-9CBA23E01BB0}.tap'; it should be: TAP_Device =

Re[6]: [fpc-pascal] TAP-Win32

2010-05-14 Thread José Mejuto
Hello FPC-Pascal, Friday, May 14, 2010, 1:34:08 PM, you wrote: JAGdFJ i am able to receive packets setting up a tap device with a fixed ip JAGdFJ and doing ping to the gateway address... JAGdFJ now i need to decipher the ioctl calls... Sorry, I can not help more, I had never used TAP and even I

Re[2]: [fpc-pascal] Powtils Apache and Windows Seven 64bits

2010-05-24 Thread José Mejuto
Hello FPC-Pascal, Monday, May 24, 2010, 8:43:08 PM, you wrote: MD Okay, but if there is not memory leaks... MD I ever free my objects! But I did not know about no memory leaks in MD CGI programs... There are no memory leaks once the program finishes, the OS releases all requested memory blocks,

Re: [fpc-pascal] stuck with untyped pointer

2010-05-28 Thread José Mejuto
Hello FPC-Pascal, Friday, May 28, 2010, 6:57:42 PM, you wrote: s s program __essai__; s {$mode objfpc}{$H+} s uses s Classes, SysUtils; s type Struct= Class s val: Integer; s constructor struct(i:Integer); s function text : String; s

Re[2]: [fpc-pascal] stuck with untyped pointer

2010-05-28 Thread José Mejuto
Hello FPC-Pascal, Friday, May 28, 2010, 11:24:44 PM, you wrote: AN I have no more suggestions but the one about deriving your TStruct from AN TObject, as almost everything in the LCL (and/or VCL, I guess I name AN them right) is a descendant of it. Struct is declared as class so it inherits

Re[2]: [fpc-pascal] stuck with untyped pointer

2010-05-28 Thread José Mejuto
Hello FPC-Pascal, Saturday, May 29, 2010, 12:09:50 AM, you wrote: Struct is declared as class so it inherits from TObject if not other class is especified. AN is that true? I don't mean not to trust you, but is the compiler AN assuming that, or is it a FPC rule? IMO a class is a class, and

Re[2]: [fpc-pascal] stuck with untyped pointer

2010-05-28 Thread José Mejuto
Hello FPC-Pascal, Saturday, May 29, 2010, 12:03:46 AM, you wrote: 3) Variable name val (Use Value instead, there is a function called val). s Naming problems in object pascal... I could not use value s because it's the name of a method that returns a value, lol! So, I s used val. But now I

Re[2]: [fpc-pascal] stuck with untyped pointer

2010-05-28 Thread José Mejuto
Hello FPC-Pascal, Saturday, May 29, 2010, 12:34:38 AM, you wrote: TObject is the base class, it inherits from nobody. To make the whole weel run a base class must exists which provide basic functionality like Create/Destroy and other methods/events like ClassName, InheritsFrom; so if no

Re[2]: [fpc-pascal] array record output/input

2010-06-02 Thread José Mejuto
Hello FPC-Pascal, Wednesday, June 2, 2010, 2:56:29 PM, you wrote: V ooh. php has 'print_r' for printing arrays/objects - an equivalent V ArrayToStr would be handy to have in Pascal. while pascal is my favourite V language, I'm finding it poorly supported compared with php :( That's not a matter

Re[4]: [fpc-pascal] array record output/input

2010-06-02 Thread José Mejuto
Hello FPC-Pascal, Wednesday, June 2, 2010, 11:12:33 PM, you wrote: That's not a matter of support, V maybe a poorly placed moan there... was getting annoyed with Indy/XML not V doing what I wanted. V i gave up trying to get XPath and XML Namespaces to work recently... whereas V ive had

[fpc-pascal] Mozilla XPCOM

2010-06-02 Thread José Mejuto
Hello FPC-Pascal, I'm trying to make the Gecko engine port compile in Ubuntu. It currently works in Win32 without problems, but in Ubuntu I had found a strange problem that could be related to fpc or not. Mozilla XPCOM is more or less based in COM interfaces, so in simple words, the code loads

Re[2]: [fpc-pascal] Mozilla XPCOM

2010-06-03 Thread José Mejuto
Hello FPC-Pascal, Thursday, June 3, 2010, 8:55:47 AM, you wrote: MVC Are you cooperating with Phil on this ? Yes. Phil is not supporting it now so I had added some improvements. MVC When I was debugging it (linux 64 bit) , the whole application stopped on a MVC floating point error somewhere

Re[6]: [fpc-pascal] array record output/input

2010-06-03 Thread José Mejuto
Hello FPC-Pascal, Thursday, June 3, 2010, 9:37:46 AM, you wrote: MvdV Be careful here. This applies to Indy9, but Indy10 has FPC compatibility and MvdV is way more portable. There is no Indy, the various major versions are totally MvdV different codebases. It was Indy 10, but more than

Re[2]: [fpc-pascal] Mozilla XPCOM

2010-06-03 Thread José Mejuto
Hello FPC-Pascal, Thursday, June 3, 2010, 10:08:00 AM, you wrote: When I was debugging it (linux 64 bit) , the whole application stopped on a floating point error somewhere in mozilla's Javascript engine; I never got around to debugging that. JM Did you try disabling floating point

Re[2]: [fpc-pascal] Mozilla XPCOM

2010-06-03 Thread José Mejuto
Hello FPC-Pascal, Thursday, June 3, 2010, 10:24:43 AM, you wrote: Did you try disabling floating point exceptions? A lot of C code assumes that floating point exceptions are disabled (since that's what the C library does on startup). MVC Aha. And how do I do that ? Set8087CW($133F); ? Or

Re[8]: [fpc-pascal] array record output/input

2010-06-03 Thread José Mejuto
Hello FPC-Pascal, Thursday, June 3, 2010, 11:33:24 AM, you wrote: MvdV There are some minor issues on OS X (with _some_ components only), but for MvdV the rest to my best knowledge they work. They are great news to me :) Nice to know it, thank you. -- Best regards, José

Re[2]: [fpc-pascal] Mozilla XPCOM

2010-06-03 Thread José Mejuto
Hello FPC-Pascal, Thursday, June 3, 2010, 8:55:47 AM, you wrote: MVC Are you cooperating with Phil on this ? Just to keep the message in thread, I re-answer this message. After a bit more debugging I found something strange (again it could be fpc related or not, I'm not sure). This is the firs

Re[2]: [fpc-pascal] Mozilla XPCOM

2010-06-03 Thread José Mejuto
Hello FPC-Pascal, Thursday, June 3, 2010, 2:26:58 PM, you wrote: Did you try disabling floating point exceptions? A lot of C code assumes that floating point exceptions are disabled (since that's what the C library does on startup). JM Another possible problem can be the fact that FPC

Re[2]: [fpc-pascal] Mozilla XPCOM

2010-06-03 Thread José Mejuto
Hello FPC-Pascal, Thursday, June 3, 2010, 3:31:31 PM, you wrote: JM You can try putting breakpoints on FPEXIT, _haltproc and _exit (the JM last one only exists if libc is linked, but that's definitely the case JM here; note that all of them are case-sensitive). That should catch JM most exits.

Re[6]: [fpc-pascal] Mozilla XPCOM

2010-06-04 Thread José Mejuto
Hello FPC-Pascal, Friday, June 4, 2010, 10:37:42 AM, you wrote: And this is the backtrace. Any idea ? JM Maybe you are executing Pascal code in threads that have not been JM started via the FPC rtl? (i.e., not via beginthread nor via JM tthread.create) That is not supported on Unix platforms.

Re[7]: [fpc-pascal] Mozilla XPCOM

2010-06-04 Thread José Mejuto
Hello FPC-Pascal, Friday, June 4, 2010, 2:10:22 PM, you wrote: If that's the case is any kind of workaround ? Callbacks are only 4 or 5 functions +/- and maybe I can create another thread (in pascal) and inquiry this thread to process the data and put result in some kind of shared memory

Re[10]: [fpc-pascal] Mozilla XPCOM

2010-06-07 Thread José Mejuto
Hello FPC-Pascal, Monday, June 7, 2010, 10:34:26 AM, you wrote: JM safecall is not supported (= ignored) on non-Windows platforms, JM because it is completely Windows-specific. Afaik, GCC does not support JM any safecall calling convention on Linux either. It is silently changed by stdcall do

Re[12]: [fpc-pascal] Mozilla XPCOM

2010-06-07 Thread José Mejuto
Hello FPC-Pascal, Monday, June 7, 2010, 4:25:59 PM, you wrote: It is silently changed by stdcall do not ? JM It is completely ignored. So it is the same as the default calling JM convention (which is register on i386, and stdcall=register=cdecl=... JM on other platforms). Wow, that looks

Re[14]: [fpc-pascal] Mozilla XPCOM

2010-06-07 Thread José Mejuto
Hello FPC-Pascal, Monday, June 7, 2010, 6:41:21 PM, you wrote: Yes, but removing the const still passes the parameter as 16 bytes, and defining it as var creates problems when passing an interface to extract the GUID instead passing the interface reference. Anyway most of this problems are

Re[2]: [fpc-pascal] fpdoc and multiple Include paths issue

2010-06-08 Thread José Mejuto
Hello FPC-Pascal, Tuesday, June 8, 2010, 2:23:52 PM, you wrote: I know, and tried both just too see. But as Jonas has said, FPC itself uses semi-colon on all platforms, hence the reason I tried semi-colon first. JM The compiler should actually be changed to use the platform-specific JM

Re[2]: [fpc-pascal] methods of an object to create others objects

2010-07-07 Thread José Mejuto
Hello FPC-Pascal, Wednesday, July 7, 2010, 3:48:13 PM, you wrote: AB Martin, I didn't get to the end of your email because I find that AB first major part - part and parcel of why Delphi failed as a language. AB It became unviable because exception handling and blow-outs. Which AB in turn were

Re[4]: [fpc-pascal] methods of an object to create others objects

2010-07-07 Thread José Mejuto
Hello FPC-Pascal, Wednesday, July 7, 2010, 4:49:03 PM, you wrote: MD Exactly. MD I just wonder how you do in web apps that are not CGI. As I said MD earlier in an email here: MD http://lists.freepascal.org/lists/fpc-pascal/2010-July/025902.html MD ...but I guess that is to be reviewed, perhaps,

[fpc-pascal] Two questions about Pascal

2010-07-29 Thread José Mejuto
Hello FPC-Pascal, Two simple questions. 1) Is there any way in Pascal to write something like this (pseudocode): With Result:=Object.Create() do begin Free; end; Which will be written without the with as: Result:=Object.Create(); Result.Free; 2) Which is the expected way to detect if a

Re[2]: [fpc-pascal] Two questions about Pascal

2010-07-29 Thread José Mejuto
Hello FPC-Pascal, Thursday, July 29, 2010, 8:54:44 PM, you wrote: 1) Is there any way in Pascal to write something like this (pseudocode): With Result:=Object.Create() do begin Free; end; JM Just leave out the Result:= part and it will compile/work fine.. I was looking for a with like:

Re[2]: [fpc-pascal] TreeView and Nonrecursion

2010-09-01 Thread José Mejuto
Hello FPC-Pascal, Wednesday, September 1, 2010, 11:20:57 PM, you wrote: BA Just to make my question clear, for example, I can fill a TreeView control with BA particular Registry keys by enumerating registry keys recursively and put them BA in the TreeView control; then for performance reason,

Re: [fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread José Mejuto
Hello FPC-Pascal, Friday, September 3, 2010, 1:12:31 PM, you wrote: BA After my previous post, TreeView and Nonrecursion, I'd tried to ask the same BA topics in stackoverflow.com BA (http://stackoverflow.com/questions/3630047/treeview-control-and-nonrecursion) BA and I got something new. BA

Re[2]: [fpc-pascal] Recursion optimization by compiler

2010-09-03 Thread José Mejuto
Hello FPC-Pascal, Friday, September 3, 2010, 3:06:30 PM, you wrote: BA First, just curious, have somebody here ever benchmark performance between BA native stack and regular RAM as a stack? Stack is RAM, so the only difference is in the algorithm used. -- Best regards, José

Re[2]: [fpc-pascal] Recursion optimization by compiler

2010-09-04 Thread José Mejuto
Hello FPC-Pascal, Saturday, September 4, 2010, 9:07:57 AM, you wrote: RB This a misunderstanding of way recursion can be flattened RB into a loop. It's especially not useful because the transformed RB version still uses a stack, so it doesn't execute in constant RB space. I know, but as far as

Re[2]: [fpc-pascal] How to get to Range Check Error location

2010-10-02 Thread José Mejuto
Hello FPC-Pascal, Saturday, October 2, 2010, 3:07:36 PM, you wrote: JMg Forgot to tell, I compiled with -gw -gh. JMg -gw should be as good as -gl. JMg Now I tried with -gl but no luck. I get an Assembly window: JMg http://koti.phnet.fi/juhamann/Lazarus/AssemblyRangeCheck.jpg JMg but no source

Re[2]: [fpc-pascal] How to get to Range Check Error location

2010-10-03 Thread José Mejuto
Hello FPC-Pascal, Sunday, October 3, 2010, 9:10:34 AM, you wrote: JMg Lazarus Debugger code causes one range error which can be fixed with a JMg typecast. FPC showed the point clearly. Issue #0017537. JMg TApplication.HandleException Range check error JMg Stack trace: JMg $0115AA93

Re[2]: [fpc-pascal] How to get to Range Check Error location

2010-10-03 Thread José Mejuto
Hello FPC-Pascal, Sunday, October 3, 2010, 11:41:00 AM, you wrote: GG On 02/10/2010, Vincent Snijders wrote: True heap size : 1048576 True free heap : 1924768 Should be : 1048576 It just says that heaptr didn't calculate the True free heap size correctly. GG Either way, this should then

Re[2]: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread José Mejuto
Hello FPC-Pascal, Friday, October 8, 2010, 3:49:52 PM, you wrote: GG The application needs to wait for the logging threads to complete GG before it can terminate. GG This is where the problem comes in. As soon as I call GG SomeThread.WaitFor, the application is frozen - it never gets to GG

Re[2]: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread José Mejuto
Hello FPC-Pascal, Friday, October 8, 2010, 8:03:01 PM, you wrote: SB This isn't a race condition, but a dead lock (but both are bad things ^^). You are right :) I'm used to use the Deadlock term when explicit locks are being used, but yes, that's a DeadLock. SB Also on Windows this works,

Re[2]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-01 Thread José Mejuto
Hello FPC-Pascal, Monday, November 1, 2010, 8:40:45 PM, you wrote: MD On Mon, Nov 1, 2010 at 4:27 PM, Alberto Narduzzi MD albertonardu...@yahoo.com wrote: Sorry, I agree. But as I search for text within PDF files? I assumed true the following statement of yours... [Somebody can help me

Re[4]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread José Mejuto
Hello FPC-Pascal, Tuesday, November 2, 2010, 11:02:18 AM, you wrote: TH If I understand it correctly, this assumes reading the whole file into TH memory at once. Depending on the size of that file and other conditions, TH this may or may not be advisable... Yes, and a pdf2text conversion will

Re: [fpc-pascal] looking for a book - XLIB Programming Manual Rel.5 Volume One

2010-11-04 Thread José Mejuto
Hello Graeme, Thursday, November 4, 2010, 7:20:24 AM, you wrote: GG XLIB Programming Manual, Rel. 5 Volume One, Third Edition GG Print ISBN: GG 978-1-56592-002-6 GG ISBN 10: GG 1-56592-002-3 http://www.niksula.hut.fi/~jkirma/books/xlib.pdf It is not eBook, but... -- Best regards,

Re: [fpc-pascal] variables in class, class variables and fields

2010-11-05 Thread José Mejuto
Hello FPC-Pascal, Friday, November 5, 2010, 8:54:08 PM, you wrote: i Following the bug discovered in the class variables (on fpc devel), I i actually would like to know the need (or usage) for variables and class i variables in a class (I know it's a delphi thingy, but still). i Furthermore, why

Re[2]: [fpc-pascal] Unable to compile JSON SuperObject on FPC 2.5.1

2010-11-10 Thread José Mejuto
Hello FPC-Pascal, Wednesday, November 10, 2010, 11:57:52 AM, you wrote: function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; MVC The declaration of the IUnknown has been changed on non-windows platforms MVC to be XP-COM compatible. You can copy the new definition

Re: [fpc-pascal] debugging faulty pointer

2010-11-17 Thread José Mejuto
Hello FPC-Pascal, Wednesday, November 17, 2010, 7:42:43 AM, you wrote: tl pointer $09BB93BC does not point to valid memory block tl Marked memory at $09BB93FC invalid tl Wrong signature $ instead of 3B1E2C54 tl $0808D487 line 501 of SSIMainForm.pas [...] tl Does anyone have any

[fpc-pascal] Compile 2.5.1 Ubuntu

2010-12-06 Thread José Mejuto
Hello FPC-Pascal, There are several months since I recompiled my 2.5.1 (SVN) in Ubuntu, today I had installed 2.4.2 and tried to recompile SVN today, but: /home/joshy/pascal/fpc/compiler/ppc386 -XX -CX -Ur -Xs -O2 -n -S2 -Fu/home/joshy/pascal/fpc/rtl/units/i386-linux

Re: [fpc-pascal] Compile 2.5.1 UbuntuIn-Reply-To=

2010-12-07 Thread José Mejuto
Hello FPC-Pascal, Tuesday, December 7, 2010, 3:55:40 PM, you wrote: AC I think the problem is that SVN does not update 'Makefile' and 'Makefile.fpc'. AC You need to delete them and you can regenerate them with 'svn update'. AC Try it and tell us. Yes, it works, thank you. I never happends to

[fpc-pascal] Help building fpc svn Win64

2011-01-04 Thread José Mejuto
Hello FPC-Pascal, I'm stuck trying to build fpc win64 svn. As a bootstrap I'm using 2.4.3 from a snapshot at http://www.hu.freepascal.org/lazarus/ This snapshot is missing the cmp.exe file, so I had used the win32 one. After an error about not found as.exe I had used the win32 version too, but

Re[2]: [fpc-pascal] Help building fpc svn Win64

2011-01-05 Thread José Mejuto
Hello Darius, Wednesday, January 5, 2011, 12:36:40 AM, you wrote: DB Doesn't mingw64 provide as and ld? Yes but everywhere in the wiki binutils is referenced, mingw* is named only for crosscompiling and with the known incompatibility about different ports (mingw, cygwin, ...) I was looking for

Re[2]: [fpc-pascal] Help building fpc svn Win64

2011-01-05 Thread José Mejuto
Hello FPC-Pascal, Wednesday, January 5, 2011, 10:26:12 AM, you wrote: VS 2011/1/5 Marco van de Voort mar...@stack.nl: This snapshot is missing the cmp.exe file, so I had used the win32 one. After an error about not found as.exe I had used the win32 version too, but now I'm stuck at an ld.exe

Re[4]: [fpc-pascal] Help building fpc svn Win64

2011-01-05 Thread José Mejuto
Hello FPC-Pascal, Wednesday, January 5, 2011, 4:50:20 PM, you wrote: DB On Jan 5, 2011, at 12:07 PM, José Mejuto wrote: Anyway I was looking for mingw binutils for win64 in the website without success, only win32 builds. http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GNU

Re[6]: [fpc-pascal] Help building fpc svn Win64

2011-01-11 Thread José Mejuto
Hello FPC-Pascal, Tuesday, January 11, 2011, 12:21:19 PM, you wrote: PFP You should be able to use the 32-bit version of GoRC PFP there is no need of a 64-bit version, as the compiler PFP adds the /machine amd64 option when calling it PFP for win64 OS target. PFP Could you test this out?

Re[2]: [fpc-pascal] Re: Permuted index (KWIC) of function descriptions

2011-01-28 Thread José Mejuto
Hello FPC-Pascal, Friday, January 28, 2011, 10:18:06 AM, you wrote: Isn't DocView's (INF help) searching or some CHM viewer (your mileage may vary depending which viewer and platform you use) good enough for searching the help? mvwb Not if I want to have it as a CGI on the server. Do you

Re: [fpc-pascal] Re: Converting .doc and/or .html to .pdf

2011-01-30 Thread José Mejuto
Hello Bo, Sunday, January 30, 2011, 9:46:22 AM, you wrote: BB The problem is that in order to read them one must have an instance of BB MSOffice installed and it sometimes takes a long time to open each BB document too. So I have been on the lookout for some way to implement BB a program for

Re: [fpc-pascal] Re: Converting .doc and/or .html to .pdf

2011-01-30 Thread José Mejuto
Hello Bo, Sunday, January 30, 2011, 9:46:22 AM, you wrote: BB And now this thread appears here that is very similar to what I need. BB If a Lazarus/FPC implementation is created, possibly using the BB OpenOffice hook described here, I would be very much interested too! Please, forget my last

[fpc-pascal] trunk/packages/libxml/src/xmlxsdparser.pas

2011-02-05 Thread José Mejuto
Hello FPC-Pascal, Browsing recent changes in compiler I saw that xmlxsdparser has been updated with some timezone functions conversion. This conversions seems wrong to me as they are performed using today conditions not given date/time conditions, so if today the computer is in daylight saving

Re[2]: [fpc-pascal] Re: html scrapping library

2011-02-15 Thread José Mejuto
Hello FPC-Pascal, Tuesday, February 15, 2011, 6:08:29 PM, you wrote: i I have a spelling error, it's HTML scraping, it means to read HTML (and few i other contents on the web), and extract information using for example CSS i elements (that is #id .class:first) will brings the first data inside

[fpc-pascal] constref question

2011-03-04 Thread José Mejuto
Hello FPC-Pascal, The parameter passing mode constref ensures that something is passed as reference and never as value, so my question is using something like this: type pmyrec=^myrec; myrec=record a: integer; b: integer; c: integer; end; MyInterf = interface []

Re[2]: [fpc-pascal] constref question

2011-03-05 Thread José Mejuto
Hello FPC-Pascal, Saturday, March 5, 2011, 12:24:24 PM, you wrote: it fails with a sigsegv. Are both expected to have the same behavior in this case ? (pointer to record). JM constref is basically the same as var as far as passing JM the parameter is concerned. That means that in the case

  1   2   3   >