[fpc-devel] property syntax extension

Daniël Mantione daniel.mantione at freepascal.org
Sun Oct 21 08:36:24 CEST 2007



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. 

Daniël


More information about the fpc-devel mailing list