Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Le Duc Hieu
From my observation while debugging, local variable inside procedure/functions usually contains garbage value (not initialized).

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Lukasz Sokol
On 10/03/15 06:10, Jürgen Hestermann wrote: > > Am 2015-03-09 um 19:24 schrieb DaWorm: >> I would think this part answers that question: "The warning means >> that no value has been */explicitly/* assigned to these variables >> (which */may indicate a logic error/* in the code), not necessarily >

Re: [fpc-pascal] how to use procedure of object in C

2015-03-10 Thread Michael Schnell
On 03/09/2015 04:20 PM, Xiangrong Fang wrote: can I implement SetHandler in a library written in C, then call h in C? For inter-language calls you obviously need to to define the calling style on both sites. e.g. "STDCALL" or "PASCAL", to make both use compatible calling conventions. I don'

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Mattias Gaertner
On Tue, 10 Mar 2015 08:48:49 + Lukasz Sokol wrote: > On 10/03/15 06:10, Jürgen Hestermann wrote: >[...] > > Why not simply omit these messages (for managed types)? > > Just because YOU don't need it, doesn't mean it's useless for everybody... > > http://www.freepascal.org/docs-html/prog/pro

Re: [fpc-pascal] how to use procedure of object in C

2015-03-10 Thread OBones
Xiangrong Fang wrote: However, like in my first mail, if I define THandler a procedure of object, it makes easier to SetHandler(AMethod); but how can I use that "procedure of object" pointer in the so? It works the same, cast the data you receive to a TMethod and call the "code" member with t

[fpc-pascal] FPDoc an deprecated functions

2015-03-10 Thread Graeme Geldenhuys
Hi, Is the tag the only way to mark methods or functions deprecated in the documentation? I've just tried the latest fpdoc from trunk and it doesn't seem to show the deprecated keyword in the "Declaration" section of the documentation. I'm happy using the VERSION tag, but just wondered if there

[fpc-pascal] JVM

2015-03-10 Thread Mattias Gaertner
Hi, I tried to build ppcjvm and failed. I followed the wiki instructions: http://wiki.freepascal.org/FPC_JVM/Building fpcmake of 3.1.1 is in PATH. make CROSSOPT="-O2 -g" CPU_TARGET=jvm OS_TARGET=java clean all It stops Error: Assembler jasmin.jar not found, switching to external assembling I tr

Re: [fpc-pascal] JVM

2015-03-10 Thread Jonas Maebe
On 10/03/15 11:12, Mattias Gaertner wrote: > I tried to build ppcjvm and failed. > I followed the wiki instructions: > http://wiki.freepascal.org/FPC_JVM/Building > > fpcmake of 3.1.1 is in PATH. > make CROSSOPT="-O2 -g" CPU_TARGET=jvm OS_TARGET=java clean all > > It stops > Error: Assembler jas

Re: [fpc-pascal] FPDoc an deprecated functions

2015-03-10 Thread Michael Van Canneyt
On Tue, 10 Mar 2015, Graeme Geldenhuys wrote: Hi, Is the tag the only way to mark methods or functions deprecated in the documentation? I've just tried the latest fpdoc from trunk and it doesn't seem to show the deprecated keyword in the "Declaration" section of the documentation. This is

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Lukasz Sokol
On 10/03/15 09:08, Mattias Gaertner wrote: > On Tue, 10 Mar 2015 08:48:49 + > Lukasz Sokol wrote: > >> On 10/03/15 06:10, Jürgen Hestermann wrote: >> [...] >>> Why not simply omit these messages (for managed types)? >> >> Just because YOU don't need it, doesn't mean it's useless for everybody

Re: [fpc-pascal] how to use procedure of object in C

2015-03-10 Thread Jonas Maebe
On 10 Mar 2015, at 10:40, OBones wrote: Xiangrong Fang wrote: However, like in my first mail, if I define THandler a procedure of object, it makes easier to SetHandler(AMethod); but how can I use that "procedure of object" pointer in the so? It works the same, cast the data you receive to

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Mattias Gaertner
On Tue, 10 Mar 2015 12:04:37 + Lukasz Sokol wrote: >[...] > > For example in Lazarus 1.3+ you can right click the message and > > click on "Hide with project option (-vm5089)". > > Cool, but probably not what I meant ;) as this hides it project-wide ? Yes. I guess that is what Jürgen wants.

[fpc-pascal] fpdoc to use custom CSS file for HTML output

2015-03-10 Thread Graeme Geldenhuys
Hi, Why is the --css-file option limited to the CHM output? Why can't I specify it for the HTML output too? Alternatively, how do I tell fpdoc not to use the default (built-in) fpdoc.css, but rather use my version. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using F

Re: [fpc-pascal] fpdoc to use custom CSS file for HTML output

2015-03-10 Thread Michael Van Canneyt
On Tue, 10 Mar 2015, Graeme Geldenhuys wrote: Hi, Why is the --css-file option limited to the CHM output? Why can't I specify it for the HTML output too? You can. It's an error in the usage message. Michael. ___ fpc-pascal maillist - fpc-pasca

Re: [fpc-pascal] fpdoc to use custom CSS file for HTML output

2015-03-10 Thread Graeme Geldenhuys
On 2015-03-10 13:26, Michael Van Canneyt wrote: > You can. It's an error in the usage message. Brilliant - I can confirm it works! It is apparently an error/bug in the fpdoc documentation too. http://www.freepascal.org/docs-html/fpdoc/fpdocsu6.html#x18-170003.2.6 Regards, - Graeme - -- f

Re: [fpc-pascal] fpdoc to use custom CSS file for HTML output

2015-03-10 Thread Michael Van Canneyt
On Tue, 10 Mar 2015, Graeme Geldenhuys wrote: On 2015-03-10 13:26, Michael Van Canneyt wrote: You can. It's an error in the usage message. Brilliant - I can confirm it works! It is apparently an error/bug in the fpdoc documentation too. http://www.freepascal.org/docs-html/fpdoc/fpdocsu6.

Re: [fpc-pascal] JVM

2015-03-10 Thread Jonas Maebe
On 10 Mar 2015, at 11:21, Jonas Maebe wrote: On 10/03/15 11:12, Mattias Gaertner wrote: I tried the instruction for Jasmin: I downloaded and unpacked jasmin 2.4. Applying the patch failed, because it changes line endings. "patch" needs the option "--binary" for that. It worked for me when

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Sven Barth
Am 10.03.2015 13:05 schrieb "Lukasz Sokol" : > > On 10/03/15 09:08, Mattias Gaertner wrote: > > On Tue, 10 Mar 2015 08:48:49 + > > Lukasz Sokol wrote: > > > >> On 10/03/15 06:10, Jürgen Hestermann wrote: > >> [...] > >>> Why not simply omit these messages (for managed types)? > >> > >> Just be

Re: [fpc-pascal] fpdoc to use custom CSS file for HTML output

2015-03-10 Thread Graeme Geldenhuys
On 2015-03-10 13:41, Michael Van Canneyt wrote: > > I am open for different formatting for the documentation. > It would be nice to have a set of 'themes'. Attached is what I worked on last night - still need a few tweaks (media support). It will be the new theme for fpGUI's class docs in the up

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Jürgen Hestermann
Am 2015-03-10 um 09:48 schrieb Lukasz Sokol: On 10/03/15 06:10, Jürgen Hestermann wrote: Am 2015-03-09 um 19:24 schrieb DaWorm: I would think this part answers that question: "The warning means that no value has been */explicitly/* assigned to these variables (which */may indicate a logic err

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Jürgen Hestermann
Am 2015-03-10 um 10:08 schrieb Mattias Gaertner: On Tue, 10 Mar 2015 08:48:49 + Lukasz Sokol wrote: On 10/03/15 06:10, Jürgen Hestermann wrote: [...] Why not simply omit these messages (for managed types)? Just because YOU don't need it, doesn't mean it's useless for everybody... http:

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Sven Barth
Am 10.03.2015 17:25 schrieb "Jürgen Hestermann" : > > > Am 2015-03-10 um 10:08 schrieb Mattias Gaertner: > >> On Tue, 10 Mar 2015 08:48:49 + >> Lukasz Sokol wrote: >> >>> On 10/03/15 06:10, Jürgen Hestermann wrote: >>> [...] Why not simply omit these messages (for managed types)? >>>

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Sven Barth
Am 10.03.2015 17:36 schrieb "Sven Barth" : > > Am 10.03.2015 17:25 schrieb "Jürgen Hestermann" : > > > > > > > Am 2015-03-10 um 10:08 schrieb Mattias Gaertner: > > > >> On Tue, 10 Mar 2015 08:48:49 + > >> Lukasz Sokol wrote: > >> > >>> On 10/03/15 06:10, Jürgen Hestermann wrote: > >>> [...] >

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Lukasz Sokol
On 10/03/15 16:08, Jürgen Hestermann wrote: > > Am 2015-03-10 um 09:48 schrieb Lukasz Sokol: >> On 10/03/15 06:10, Jürgen Hestermann wrote: >>> Am 2015-03-09 um 19:24 schrieb DaWorm: I would think this part answers that question: "The warning means that no value has been */explicitly/*

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Lukasz Sokol
On 10/03/15 13:54, Sven Barth wrote: >> I mean, it's good to have this warning enabled by default and only suppress >> it around code >> that /I/ know it's bogus at. Otherwise, it /really/ wouldn't serve its >> purpose of pointing >> where a PEBKAC^WLOGIC ERROR may occur... >> >> Sort of like su

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Lukasz Sokol
On 10/03/15 16:08, Jürgen Hestermann wrote: > > Am 2015-03-10 um 09:48 schrieb Lukasz Sokol: >> On 10/03/15 06:10, Jürgen Hestermann wrote: >>> Am 2015-03-09 um 19:24 schrieb DaWorm: I would think this part answers that question: "The warning means that no value has been */explicitly/*

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Mattias Gaertner
On Tue, 10 Mar 2015 18:08:14 +0100 Jürgen Hestermann wrote: > Am 2015-03-10 um 17:40 schrieb Sven Barth: > > > It mutes the warning with the ID 5089 (the ID can be seen with -vq). So > as long as the managed and unmanaged ones use the same warning ID (AFAIR they > do) they will both be silence

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Jürgen Hestermann
Am 2015-03-10 um 18:16 schrieb Lukasz Sokol: On 10/03/15 16:08, Jürgen Hestermann wrote: Then please tell me, what do you (or anybody else) gain from this warning? Especially, as it claims something that is definitely not true (for managed types). It may even misguide some to add initialisatio

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Florian Klämpfl
Am 10.03.2015 um 18:43 schrieb Jürgen Hestermann: > > Am 2015-03-10 um 18:16 schrieb Lukasz Sokol: >> On 10/03/15 16:08, Jürgen Hestermann wrote: >>> Then please tell me, what do you (or anybody else) gain from this warning? >>> Especially, as it claims something that is definitely not true (for m

Re: [fpc-pascal] Suggestion: TDataSetEnumerator

2015-03-10 Thread silvioprog
On Sat, Mar 7, 2015 at 4:27 AM, LacaK wrote: > What if TDataSetEnumerator.Current will return TFields instead of TDataSet > which enumerates? > > Example: > procedure IterateDataSet; > var DataSet, DS: TDataSet; > Flds: TFields; > F: TField; > begin > for Flds in DataSet do

Re: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

2015-03-10 Thread Jürgen Hestermann
Am 2015-03-10 um 18:52 schrieb Florian Klämpfl: > Using dyn. arrays without initialization makes litte sense in real world programs, Why this? I do this all the time. I know that they *are* already initialized so why should I do this again? > so those warnings have their use. Of what use are t