On Tue, 1 May 2018 14:20:12 +0700 Ryan Joseph <r...@thealchemistguild.com> wrote:
> > On May 1, 2018, at 2:03 PM, Michael Van Canneyt <mich...@freepascal.org> > > wrote: > > > > Of sorts. > > MyClass = Class external name 'my' > > const > > MyConst : integer > > end; > > > > Will emit MyClass.MyConst. The compiler needs to know the type. > > I’m confused now. I think you confused Michael. ;) At the moment you can define external const like this: var NaN: Double; external name 'NaN'; Infinity: Double; external name 'Infinity'; NegInfinity: Double; external name '-Infinity'; Note that the 'var' is a workaround till eventually pas2js supports external 'const' without expression. A const inside an external class already works: type TMyExt = class external name 'Bla' const LoVersion: GLFloat; const HiVersion: GLFloat; external name 'hiversion'; end; Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal