Michael Van Canneyt <mich...@freepascal.org> schrieb am So., 13. Okt. 2019, 08:20:
> > 2) For..in loops > > > > EParserError: Expected := or in at token "(" in file > > > > /Users/ryanjoseph/Developer/Projects/FPC/NewEngine/Sources/Examples/EmptyWindow.pas > at line 138 column > > 14 > > > > > > For in loops should be supported, but I've never seen this before: > > > > for pointer(entity) in entities do > > > > > > What is for pointer(entity) in entities supposed to do ? > > > > It can be that this syntax is not supported (no surprise, since I > don't have > > a clue what this is supposed to do). > > > > > > Just type casting because the array is an array of pointers. I get these > errors otherwise "Incompatible types: got "Pointer" > > expected “TEntity"”. I could use a proper type in a generic array but I > don’t always do that. > > I didn't know you could do this in a for in loop. FPC eats this ? > It currently does, but it might as well be a bug in FPC. I'll have to cross check with Delphi. > > > > begin > > entity.Update; > > entity.Draw(renderer); > > renderer.PushBox(entity.GetHitBox, TRGBA.RedColor); > > end; > > > > 3) {$i settings} will not find the file “settings.inc”. This > is valid in FPC but the parser seems to > > have other rules. > > > > > > They should be the same. > > > > As said, pas2js uses fcl-passrc, and pas2js handles inifiles just > as FPC > > does. > > > > > > Another bug then. Should I make a bug report for these? > > Not yet. > > I have no idea how you call the parser. Include files most > definitely work: the documentation generator uses fcl-passrc, and the > RTL/FCL is full of include files. > > Probably your invocation of the parser is simply wrong or missing some > arguments. > Could the missing ".inc" be the problem? I have not checked, but it could be that FPC always adds ".inc" if no extension is present. Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal