[Lazarus] Type helper now work with CodeTools?
Sven Barth
pascaldragon at googlemail.com
Sun Oct 18 17:03:33 CEST 2015
Am 18.10.2015 16:07 schrieb "Mattias Gaertner" <nc-gaertnma at netcologne.de>:
>
> On Sat, 17 Oct 2015 09:28:53 +0200
> Sven Barth <pascaldragon at googlemail.com> wrote:
> > > It still looks strange to me.
> >
> > Well... It's a logical extension of the type helpers however (and Delphi
> > compatible). The only critical part is that literal constants don't
have a
> > type per se and thus the chosen helper might be different :/ (e.g. an
Int16
> > helper when one expected an Int32 one or so...)
>
> Does the compiler support 3.member?
Yes. I especially adjusted the compiler to handle this correctly (in light
of floating point constants). Sidenote: the compiler also supports floating
point numbers with an without "e" to have type helper method calls.
"True" and "False" as well by the way.
Best take a look at the tests we have (tests/test/tthlp*.pp), especially
tthlp4.pp which deals with constants. The follow up tests also deal with
the different String types combined with mode switches.
Oh and there are also class methods that can be called on both the values
as well as the type names, just like on classes and records (don't know
whether the CodeTools support these for helpers yet).
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151018/8361f7cb/attachment-0003.html>
More information about the Lazarus
mailing list