rem
int GetInt()
return 0
bool LinkedNodesTest(int x, y)
return x < GetInt() < GetInt() < y
bool LinkedNodesTest2(int x, y)
return (if x < GetInt() < y then 1 else 0) ==
(if x < GetInt() < y then 1 else 0)
void Test(int x, y)
Test x + y, (x - y) + (x - y)
void RefTest(ref int a)
a = 234
int x
RefTest ref x
RefTest ref a
class Base
int Member = 10
int Func()
Member = 10
return 0
class MyStruct : Base
int x
rem MyStruct(int x, y)
: base x, y
int Func(MyStruct S)
S.Member = 123
S.x = 123
return S.Func() + S.Func()
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
void SwapTest()
var x = 0, y = 0
x, y = y, x
int TestIntTest((int, int) a)
(var x, var y) = a
x, y = y, x
return x + y
type float2 = (float, float)
float Test(float2 a)
(var x, var y) = a
x, y = y, x
return x + y
rem
float2 Ret Test(int x)
Ret = x, x
if x == 0 then return
Ret.0 = 123
float x, y MultiRetTest(float v)
x = v + v
if x == 0 then return
y = v * v
float2 NewTest()
var v1 = new float2, v2 = new float2
return v1 + v2
float2 Mul((int, float) a, (float, int) b)
return a * b
int, int CreateTuple(float x, y)
return (int, int)(x, y)
return (int)x, (int)y
float x, y Test((float x, y) Ret)
'return Ret
return 0, 1
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
rem
int NullCoalescingTest(int* Ptr1, Ptr2)
return *(Ptr1 ?? Ptr2)
struct SNStruct
SNStruct* Ptr
SNStruct* SafeNavigationTest(SNStruct* Ptr)
return Ptr?->Ptr?->Ptr?->Ptr
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
rem
class Vector
int x, y
Vector(int x, y)
this.x = x
this.y = y
bool NotNullVec()
return !(x == 0 and y == 0)
class DVector : Vector
double Length
DVector(int x, y) : base x, y
Length = sqrt(x * x + y * y)