[Pas2js] My 1st type helper
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Feb 28 21:13:26 CET 2019
On Thu, 28 Feb 2019 19:47:15 +0100
Sven Barth via Pas2js <pas2js at lists.freepascal.org> wrote:
> Am 27.02.2019 um 14:07 schrieb warleyalex via Pas2js:
> > this syntax
> > // TFloatHelper = helper for Float
> >
> > // hum, doesn't work for me, I had to include the keyword type
> Correct, because they're *type* helpers. To have them distinct from
> "class helper" and "record helper" (though FPC allows nearly any type
> nowadays for type helpers, don't know if pas2js followed that).
pas2js requires class helpers for classes and external classes.
type helpers can extend records, simple types, range types, array types,
enum types, set types.
For example you cannot extend helpers, interfaces, pointer types or
procedure types.
Mattias
More information about the Pas2js
mailing list