[fpc-pascal] Use of abstract classes
    Michael Fuchs 
    m.fuchs at ypa-software.de
       
    Tue Jan  8 12:48:24 CET 2013
    
    
  
Hello,
I have the following test program:
program AbstractTest;
{$MODE ObjFpc}{$H+}
uses Classes;
type
   TAbstractClass = class abstract(TObject)
   end;
var
   MyAbstractClass: TAbstractClass = nil;
begin
   MyAbstractClass := TAbstractClass.Create;
   MyAbstractClass.Free;
end.
I thougt this would cause a compiler error, while creating a abstract 
class. Surprisingly it compiles, even without a warning.
Do I have to use any compiler switches or is there no sense in using the 
abstract keyword for a class?
Michael
    
    
More information about the fpc-pascal
mailing list