Mattias Gaertner schrieb: > On Sun, 21 Oct 2007 08:36:24 +0200 (CEST) > Daniël Mantione <[EMAIL PROTECTED]> wrote: > >> >> Op Sun, 21 Oct 2007, schreef Michael Van Canneyt: >> >>>>> .ppu file format is something so general and >>>>> commonly used by (Free) Pascal programmers that >>>>> it should become part of our RTL. >>>> And another: >>>> A lazarus built with fpc 2.0.4 should be able to read the ppu of >>>> 2.3.x. Even though the ppu format is very stable, it is not >>>> carved in stone. >>> It's built so that a newer version can always read an older PPU file >>> and vice versa: an old ppu unit can read a newer file, but just >>> doesn't know how to interpret certain blocks. >> This is not true. Take for example: >> >> procedure tarraydef.ppuwrite(ppufile:tcompilerppufile); >> begin >> inherited ppuwrite(ppufile); >> ppufile.putderef(_elementdefderef); >> ppufile.putderef(rangedefderef); >> ppufile.putaint(lowrange); >> ppufile.putaint(highrange); >> ppufile.putsmallset(arrayoptions); >> ppufile.writeentry(ibarraydef); >> end; >> >> If the arrayoptions for example becomes a large set (>32 elements), an >> old version that will try to read a new version will read too little >> data. We will of course bump the ppu version, so the compile refuses >> old ppus. > > Is the newer ppureader be able to read older ppu? > In other words: Does a current ppureader contains the code to read the > old format too?
No. I discussed this already with Paul. My proposal is generate a separate xml file containing the attributes. This xml can be used by IDEs or included in the final executable if necessary. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel