Wiki

Changes between Version 1 and Version 2 of Delegates

Show
Ignore:
Timestamp:
11/22/10 19:31:59 (14 years ago)
Author:
todd.a
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Delegates

    v1 v2  
    1818e.g  
    1919{{{ 
     20#!cobra 
    2021sig FunctionWithOneIntArgAndReturnsBool(i as int32) as bool 
    2122}}} 
     
    2627invoking the delegate. 
    2728{{{ 
     29#!cobra 
    2830# The following declares a delegate (type) named Del that can  
    2931#encapsulate a method that takes a string  as an argument and returns void: 
     
    4749== Grammar == 
    4850{{{ 
     51#!cobra 
    4952# delegate definition 
    5053sig TYPENAME(ARGS) as TYPE 
     
    6164== Examples == 
    6265{{{ 
     66#!cobra 
    6367class SigEG 
    6468    sig IntTest(i as int) as bool 
     
    7478 
    7579{{{ 
     80#!cobra 
    7681# as above using an anon function 
    7782    tester as IntTest = do(i as int) 
     
    9297so currently delegate variable definitions need a type definition. 
    9398{{{ 
     99#!cobra 
    94100name as SIGTYPENAME = ref METHOD 
    95101# rather than just