I was looking at creating a simple generic sort routine yesterday. The
routine would call a delegate function to do the "what is greater than what"
comparison. Seems simple enough but whenever I have what looks like a
correct delegate signature declared in my form the form will not display in
the IDE and I get an error.

Delegate Function IsGreater(ByVal v1 As Integer, ByVal v2 As Integer) As
Boolean

The error is "unexpected token 'Function' of type 'KW_Function' at line 61
column 14. Expected a 'KW_Sub' token. Unsurprisingly if I change from a
function to a sub it does not error. Is there something wrong with my using
a function?

This is the delegate signature. Could someone try putting this in a windows
application and then try and use it in a form in the IDE.

Thanks

Pat Long