Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2016-01

Type Helper and Array

10 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ondrej Pokorny
to Mathias
Mathias wrote 8 lines
Does "Type Helper" only with standard types? The class itself it compiles without errors. But when you call, there is an error message. See link, there the code and the problem is described. ("Illegal qualifier") http://www.lazarusforum.de/viewtopic.php?f=10&t=9286

Type helpers work well with arrays without bounds:

type
   TVector = array of Single;
   TVectorHelper = Type Helper for TVector
   public
     procedure Add;
   end;

I cannot say if the array with bounds case is a bug or feature. Delphi doesn't support either of them (XE2 tested).

Ondrej

Reply by email

Sven Barth
to Mathias: Does "Type Helper" only with standard types? The class itself it compiles without errors.…
"Mathias" wrote 6 lines
Does "Type Helper" only with standard types? The class itself it compiles without errors. But when you call, there is an error message. See link, there the code and the problem is described. ("Illegal

qualifier")

Please report a bug with a simple example that should compile with the error message you get at http://bugs.freepascal.org as I don't see any difference between dynamic and static arrays in relation to type helpers (so probably merely an oversight of mine in the parser ^^).

Regards,
Sven

Reply by email

Ondrej Pokorny
to Sven Barth
Sven Barth wrote 6 lines
Please report a bug with a simple example that should compile with the error message you get at http://bugs.freepascal.org as I don't see any difference between dynamic and static arrays in relation to type helpers (so probably merely an oversight of mine in the parser ^^).

In that case please write about it also here so that I can update CodeTools - they now work as FPC, i.e. they find helpers for dynamic arrays but not for static ones.

Ondrej

Reply by email

Sven Barth
to Ondrej Pokorny
"Ondrej Pokorny" wrote 5 lines
On 03.01.2016 14:13, Sven Barth wrote: > > > Please report a bug with a simple example that should compile with the

error message you get at http://bugs.freepascal.org as I don't see any difference between dynamic and static arrays in relation to type helpers (so probably merely an oversight of mine in the parser ^^).

> In that case please write about it also here so that I can update

CodeTools - they now work as FPC, i.e. they find helpers for dynamic arrays but not for

Okay, will do.

Regards,
Sven

Reply by email

Mathias
to Ondrej Pokorny: In that case please write about it also here so that I can update CodeTools - they now…

Hello,

I have created a bug report.

http://mantis.freepascal.org/view.php?id=29321

mfg Mathias

Ondrej Pokorny wrote 16 lines
On 03.01.2016 14:13, Sven Barth wrote: > > Please report a bug with a simple example that should compile with > the error message you get at http://bugs.freepascal.org as I don't > see any difference between dynamic and static arrays in relation to > type helpers (so probably merely an oversight of mine in the parser ^^). > In that case please write about it also here so that I can update CodeTools - they now work as FPC, i.e. they find helpers for dynamic arrays but not for static ones. Ondrej _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Sven Barth
to Ondrej Pokorny: In that case please write about it also here so that I can update CodeTools - they now…
"Ondrej Pokorny" wrote 5 lines
On 03.01.2016 14:13, Sven Barth wrote: > > > Please report a bug with a simple example that should compile with the

error message you get at http://bugs.freepascal.org as I don't see any difference between dynamic and static arrays in relation to type helpers (so probably merely an oversight of mine in the parser ^^).

> In that case please write about it also here so that I can update

CodeTools - they now work as FPC, i.e. they find helpers for dynamic arrays but not for static ones.

Type helpers now work correctly with static arrays as well :)

Regards,
Sven

Reply by email

Sven Barth
to Mathias: I have created a bug report. http://mantis.freepascal.org/view.php?id=29321 mfg Mathias
"Mathias" wrote 6 lines
Hello, I have created a bug report. http://mantis.freepascal.org/view.php?id=29321

Fixed.

I forgot to mention that in my answer, but next time please provide a self contained, complete example that does not depend on the LCL (or other code not distributed with FPC as far as possible) and that can be compiled on the command line.

Regards,
Sven

Reply by email