[fpc-pascal] Re: Correct use of var in function calls?

2011-02-05 Thread Bo Berglund
On Fri, 4 Feb 2011 19:10:33 +0100, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 04 Feb 2011, at 16:25, Bo Berglund wrote: OK, what will happen if I have a declaration like this: function TSSCommBuf.Read(var Data: TByteArr): boolean; as opposed to function TSSCommBuf.Read(Data:

Re: [fpc-pascal] Re: Correct use of var in function calls?

2011-02-05 Thread michael . vancanneyt
On Sat, 5 Feb 2011, Bo Berglund wrote: On Fri, 4 Feb 2011 19:10:33 +0100, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 04 Feb 2011, at 16:25, Bo Berglund wrote: OK, what will happen if I have a declaration like this: function TSSCommBuf.Read(var Data: TByteArr): boolean; as opposed to

Re: [fpc-pascal] wkhtmltopdf - trying use h2pas...

2011-02-05 Thread Michael Van Canneyt
On Fri, 4 Feb 2011, Marcos Douglas wrote: Hi, I'm trying to use h2pas in wkhtmltopdf's headers... but I'm found many erros. Could you help me to translate the headers to use in Pascal? Command: h2pas libwkhtmltox-0.10.0_rc2\include\wkhtmltox\pdf.h -l wkhtmltox0.dll -o wkhtmltox0.pas -p

[fpc-pascal] Re: Correct use of var in function calls?

2011-02-05 Thread Bo Berglund
On Sat, 5 Feb 2011 09:24:44 +0100 (CET), michael.vancann...@wisa.be wrote: No. Someone misunderstands the concept of dynamic array here. A dynamic array is a pointer to an array in memory. So when passing a dynamic array to a function, you are, in fact, passing a pointer. So is there a

Re: [fpc-pascal] wkhtmltopdf - trying use h2pas...

2011-02-05 Thread ik
I'm using webkit for it, in pure pascal and the Qt binding. No need to translate this program, it's not very hard to do it. However because that my program is running in commercial environment and created for specific client, I can not release it as open source. Ido LINESIP - Opening the source

Re: [fpc-pascal] wkhtmltopdf - trying use h2pas...

2011-02-05 Thread Marcos Douglas
On Sat, Feb 5, 2011 at 7:13 AM, Michael Van Canneyt mich...@freepascal.org wrote: With an editor, open pdf.h, and replace the CAPI macro with an empty string. I thought that, but I'm not good on C so... what do this macro? Then, run h2pas libwkhtmltox-0.10.0_rc2\include\wkhtmltox\pdf.h -l

Re: [fpc-pascal] wkhtmltopdf - trying use h2pas...

2011-02-05 Thread Marcos Douglas
On Sat, Feb 5, 2011 at 7:46 AM, ik ido...@gmail.com wrote: I'm using webkit for it, in pure pascal and the Qt binding. No need to translate this program, it's not very hard to do it. However because that my program is running in commercial environment and created for specific client, I can not

Re: [fpc-pascal] wkhtmltopdf - trying use h2pas...

2011-02-05 Thread ik
On Sat, Feb 5, 2011 at 12:29, Marcos Douglas m...@delfire.net wrote: On Sat, Feb 5, 2011 at 7:46 AM, ik ido...@gmail.com wrote: I'm using webkit for it, in pure pascal and the Qt binding. No need to translate this program, it's not very hard to do it. However because that my program is

Pointer to first dynamic array element (was: Re: [fpc-pascal] Correct use of var in function calls?)

2011-02-05 Thread Michael Müller
Hi Bo! Am 03.02.2011 um 22:53 schrieb Bo Berglund: function TSSCommBuf.Read(var Data: TByteArr): boolean; // == ??? begin Result := Read(@Data, SizeOf(Data)) = SizeOf(Data); end; When using dynamic arrays @Data will not be the address of the first array element which is usually what you

Re: [fpc-pascal] Re: Building kernel modules using fpc (for fun)

2011-02-05 Thread Henry Vermaak
On 4 February 2011 21:26, Lukasz Sokol el.es...@gmail.com wrote: Lukasz Sokol el.es.cr@... writes: Looks like kernel printk works with fpc varargs : http://wiki.freepascal.org/linux/kernel/module_development#Enhancing_printk Nice :) Henry ___

Re: [fpc-pascal] Re: Correct use of var in function calls?

2011-02-05 Thread Michael Van Canneyt
On Sat, 5 Feb 2011, Bo Berglund wrote: On Sat, 5 Feb 2011 09:24:44 +0100 (CET), michael.vancann...@wisa.be wrote: No. Someone misunderstands the concept of dynamic array here. A dynamic array is a pointer to an array in memory. So when passing a dynamic array to a function, you are, in

[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: [fpc-pascal] Re: Correct use of var in function calls?

2011-02-05 Thread Florian Klaempfl
Am 05.02.2011 10:46, schrieb Bo Berglund: But that is not what I am doing at all, so I can stick with a simple: FillArr(Arr: TByteArr) and be sure that I will not get back a different array, but instead get my array filled as requested... As soon as you call SetLength, this will break

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

2011-02-05 Thread Florian Klaempfl
Am 05.02.2011 13:49, schrieb 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

[fpc-pascal] Re: Pointer to first dynamic array element (was: Re: Correct use of var in function calls?)

2011-02-05 Thread Bo Berglund
On Sat, 5 Feb 2011 12:47:53 +0100, Michael Müller mueller_mich...@alice-dsl.net wrote: Hi Bo! Am 03.02.2011 um 22:53 schrieb Bo Berglund: function TSSCommBuf.Read(var Data: TByteArr): boolean; // == ??? begin Result := Read(@Data, SizeOf(Data)) = SizeOf(Data); end; When using dynamic