Frank Heckenbach heckenb@mi.uni-erlangen.de wrote;
Thanks Andreas, Chief and the others for your explanations. I've copied your message's IDs into the To-Do-List so that I and others can easily find the messages when it's time to implement these fatures.
I've got a few little questions left (for now :-):
Concerning properties: I assume you cannot pass property fields as var parameters, right?
Correct. If you try it, you get a "Constant object cannot be passed as var parameter" error message. However, you can pass a property as a value and "Const" parameter.
try // code U try to execute except On EMyException do xxxx; // Do special exception handling here On EAnotherException do xxxx; // What you want else raise; // let the standard exception handler do the thing end;
Is there a way to get the exception that was caught into a variable or so? Something like (fantasy syntax):
On Foo : EAnotherException do Something.With (Foo.ErrDevice);
I have no idea. I don't use exceptions at all.
And can for type-conversion easyly typecased with PChar:
Procedure MyProc (xxx: PChar);
var mystring: String;
MyProc (PChar(MyString));
The most recent GPC versions can do this, but without the explicit type cast, like "MyProc (MyString);". The explicit type cast gives a warning, and not the intended result. Should GPC learn such type casts between values of different string types, too? (Peter?) (Since it seems to be necessary for Delphi compatibility, I suppose the answer will be yes.)
It will be good if GPC will accept the explicit type cast as well as do the implicit one. But note that this should only be done with long strings (at least, that is what Delphi does). With short strings, people should do their own conversion (I think - is there any reason why this should be supported with short strings other than to make life easier for programmers?).
Best regards, The Chief ----------------------- Dr Abimbola A Olowofoyeku (The African Chief) Author of Chief's Installer Pro v4.25 for Win16 and Win32 Email: laa12@keele.ac.uk Homepage: http://ourworld.compuserve.com/homepages/African_Chief