[fpc-devel] Re: Missing from documentation

Marco van de Voort marcov at stack.nl
Wed May 19 14:56:51 CEST 2010


In our previous episode, Jonas Maebe said:
> > BTW: I actually learnt something new now. I never new you could have a
> > property outside a class. I can't say that in the many years I have  
> > been
> > programming with object pascal that I have ever seen properties used  
> > as a
> > global variable. Umm?
> 
> It's an FPC-specific extension. It's mainly used to implement the  
> "port" construct from Turbo Pascal in the ports unit for Dos and Linux.

Baseunix.Errno is maybe a more used example:

  function fpgeterrno:longint; external name 'FPC_SYS_GETERRNO';
  procedure fpseterrno(err:longint); external name 'FPC_SYS_SETERRNO';

  property errno : cint read fpgeterrno write fpseterrno;




More information about the fpc-devel mailing list