some OO messiness

BlitzMax Forums/BlitzMax Programming/some OO messiness

rdodson41(Posted 2005) [#1]
I have a main type called Main that is abstract with some fields and methods. I have another type called Obj that extends main that is also abstract. Now when i declare Obj, which order does the extension and abstract go in? Is it "Type Obj Extends Main Abstract" or "Type Obj Abstract Extends Main" ?


Robert(Posted 2005) [#2]
The Abstract or Final specifiers always go at the end of the declaration, so the code is:

TYPE <identifier> EXTENDS <super-type> ABSTRACT


Xip(Posted 2005) [#3]
Abstract dont necessarily have to go on the end, one can add it to a singel Method also and not the type, but the result is basicly the same.
this goes for Final to, but that only makes that method final, of course.

type TFoo
method bar() abstract
endtype

this also makes the entire class abstract.
but i must admit, that it looks alot nicer to add it directly after the identifyer, or the extended type.