Do Clarion Interfaces support Virtual, Proc, Name, Extends & Final?
Those are all items in the Interface Declaration. Not in the method instance. Your screen shot is of the method instance, so they would have no purpose there.
Extends and Final are not part of the language. They are “special comments” which are added to the (class) declaration, which then allow the embed tree to behave (and color) things differently. They are a bit of a hack, and not part of the language. I’ve never used either.
The Interface declaration definitly supports VIRTUAL, PROC and NAME, just as it would for any method declaration.
All that said, there is a syntax quirk which is worth understanding when it comes to embedding in (aka deriving) an interface method. Usually if you embed into a method (aka create a derived version of that method) you have to declare it in the derived class;
For example;
ThisWindow CLASS(WindowManager)
Init PROCEDURE(),BYTE,PROC,DERIVED
End
ThisWindow.Init PROCEDURE
ReturnValue BYTE,AUTO
CODE
! whatever
You can derive into an interface method, but you don’t specify it in the derived class declaration - it’s implicily (optionally) there. For example;
iDriverField INTERFACE
ToRecordField Procedure(Byte pFieldType, Long pFieldAddress, Long pFieldSize, Long pSrcType, Long pSrcAddr, Long pSrcSize),LONG ,PROC,VIRTUAL
FromRecordField Procedure(Byte pFieldType, Long pFieldAddress, Long pFieldSize, Long pWriteAddress, Long pWriteSize),LONG ,PROC,VIRTUAL
ClearRecordField Procedure(Byte pFieldType, Long pFieldAddress,Long pFieldSize,String pValue),LONG,PROC,VIRTUAL
IsRecordFieldClear Procedure(Byte pFieldType, Long pFieldAddress,Long pFieldSize,String pValue),LONG,PROC,VIRTUAL
GetSourceSize Procedure(),LONG,VIRTUAL ! source size is the "disk" record size. Not the Clarion Record size. Multiplied if array.
GetFieldType Procedure(),STRING,VIRTUAL ! return a unique text identifier for the field type
GetSQLType Procedure(),STRING,VIRTUAL ! SQL Data type to use in CREATE statements
End
DriverGUIDClass Class,Implements(iDriverField), Type, MODULE('DriverFields.Clw'),LINK('DriverFields.Clw',DRVLM), DLL(DRVDM)
!!! nothing declared here
End
DriverGUIDClass.iDriverField.ClearRecordField Procedure(Byte pFieldType, Long pFieldAddress,Long pFieldSize,String pValue)
code
! whatever here, including possible parent call.
For a long time this was not known, so people (incorrectly) believed (myself included) that interface methods could not be easily derived. This lead to an unnecessary pattern where you have class methods of the same name, and all the interface method did was call the class method.