Anonymous methods

This forum is meant for examples of X# code.

Post Reply
User avatar
robert
Posts: 4552
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Anonymous methods

Post by robert »

Code: Select all

DELEGATE Multiply(x AS REAL8) AS REAL8
FUNCTION Start AS VOID
LOCAL del AS Multiply
del := {|e| e * e}
? del(1)
? del(2)
? del(3)
? del(4)
Console.ReadLine()
RETURN
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply