Re: gdb-patches RFA: Fix pascal behavior for class fields
Waldek Hebisch <[email protected]>
| Newsgroups | gmane.comp.compilers.gpc |
|---|---|
| Message-ID | <[email protected]> |
Prof. Abimbola A. Olowofoyeku (The African Chief) wrote:
>
> Supply "--extended-syntax" and GPC will accept "class" (and if you are
> going to use "Result" then you will need to add "--implicit-result").
>
> However, I do not believe that the "class" will be treated much
> differently from a bog-standard Borland Pascal "object" - for example,
> not having (or not calling) a constructor will not crash the program
> (as it should do, with Delphi-style classes).
Well, GPC intenally converts classes to _pointers_ to objcts.
Not initializing class means using nil pointer, so expect
crash. Generally, thare are differences between GPC classes
and Delphi classes, but they are more subtle. For examples
root class in Delphi has more methods than corresponding
GPC class. But basic semantics should agree.
--
Waldek Hebisch
[email protected]
_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc