You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodingUnit edited this page Jan 9, 2012
·
6 revisions
Define operator - inline function
Category: Defining Operator
Description: Define operator using inline function
Code:
using Nemerle;
using System;
using System.Console;
module Inline
{
public @%++(a : int, b : int) : int
{
a + b *2
}
}
using Inline;
def a = 9;
def r = a %++4;
WriteLine(r);
WriteLine(if (r == 17) "both elements are equal"else"elements not equal");