次の例では、いずれの myType1::m メソッドも myDelegateID で指定されたシグネチャと一致しないため、エラーが発生します。
class-id myClass.Class1.
method-id main static.
01 myDel type myDelegateID.
01 myType1 type Class2.
set myDel to method myType1::m
end method.
end class.
delegate-id myDelegateID.
procedure division using by value s as string.
end delegate.
class-id Class2.
method-id m.
procedure division using by value s1 as string returning n1 as binary-long.
set n1 to size of s1 + 3
end method.
method-id m.
procedure division using by value s1 as string s2 as string returning n1 as binary-long.
end method.
end class.
詳細については、「デリゲートとイベント」を参照してください。