Change: Check that U_!1 is not yet defined Error if within class Error if within a method _UGBO#L _UGBO#L _GBO#L .
#IF (!b & 6) // if within class or procedure...error
#IF (!b & 2) // if within class
#ERROR DFERR_COMP_ILLEGAL_CODE_PLACEMENT Classes cannot be nested within classes
#ELSE // if within method
#ERROR DFERR_COMP_ILLEGAL_CODE_PLACEMENT Classes cannot be nested within methods
#ENDIF
#ELSE
#CHECK U_!1 _T // does new class exist? If yes error
#CHECK U_!4 _U // does superclass exist? if no error
#REPLACE !1$SC !4 //define superclass of new class
#IFSAME !5 STARTMAC //if start macro specified,
#REPLACE !1$SM !6 //remember its name
#IFSAME !7 ENDMAC //if end macro specified,
#REPLACE !1$EM !8 //remember it
BASE_CREATE_CLASS !1 !2 !3 !4 !9
#ELSE
BASE_CREATE_CLASS !1 !2 !3 !4 !7 !8 !9
#ENDIF
#ELSE
#IFSAME !5 ENDMAC //no STARTMAC - if ENDMAC specified,
#REPLACE !1$EM !6 //remember it
BASE_CREATE_CLASS !1 !2 !3 !4 !7 !8 !9
#ELSE
BASE_CREATE_CLASS !1 !2 !3 !4 !5 !6 !7 !8 !9
#ENDIF
#ENDIF
#ENDIF