Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-05

Re: Constructor failing...

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Olle Raab
Show quoted text 14 lines
>>> another question; what is the best way to "fail" a constructor call? >>> For >>> example, I have a constructor "timage.loadimage()", and I want it to >>> return >>> "nil" if it encounters a problem (e.g. the file name doesn't exist). My >> >> Use fail :-) > > I cant find any construct "fail". Or do you mean "raise" ? fail is a keyword in constructors, see tokens.pas and psub.pas and search for _FAIL

So it is a 1.1-only construct ?

How do you use it ?

Olle

Reply by email