Previous Topic Next topic Print topic


COBCH1603 No indexer found for class '%1$s'

An instance of a type that does not contain an indexer is being accessed as an array.

A type must contain an indexer if an instance of that type is being accessed as an array, as shown in the following example:

class-id myClass1.
method-id main.
01 myField type myClass2.
    display myField[0]
end method.
end class.

class-id myClass2.
indexer-id string.		*> add an indexer to resolve the error
procedure division using value myParam as binary-long.
    getter.
    set property-value to myParam
end indexer.
end class.
Previous Topic Next topic Print topic