[fpc-pascal]How to make a constructor failed?
juss_it at ut.ee
Sat Aug 24 14:31:58 CEST 2002
On Fri, 23 Aug 2002, Aitor wrote:
}And what is this "fail"? Is it a predefined identifier, similar in
}category to those "exit" and "break"?
Exactly. Borland, our honourable ancestor and inventor of these things,
calls them "procedures", which is confusing, of course.
Fail can only be used inside a constructor. If I remember correctly, it
somehow calls destructor of this object or class. Anyway, it
deallocates the instance and causes the constructor to return Nil.
"Salamanders can survive up to six hours outside a fire if regularly fed
pepper" (Scamander 1927).
More information about the fpc-pascal