mirror of
https://github.com/PetroProtsyk/SSharp
synced 2026-06-08 12:11:10 +00:00
32 lines
487 B
Plaintext
32 lines
487 B
Plaintext
a = <!
|
|
c++;
|
|
b+=3;
|
|
|
|
//ScriptProg has read access to
|
|
//global variables
|
|
Test.AreEqual(3, c);
|
|
Test.AreEqual(8, b);
|
|
|
|
//in order to modify them it should
|
|
//use global
|
|
|
|
global:c+=10;
|
|
|
|
return 2;!>;
|
|
|
|
c=2;
|
|
b=5;
|
|
|
|
f = a();
|
|
|
|
Test.AreEqual(2, f);
|
|
Test.AreEqual(12, c);
|
|
Test.AreEqual(5, b);
|
|
|
|
Test.AreEqual(2, eval('1+1'));
|
|
|
|
|
|
a = <! return a+b; !>;
|
|
|
|
Test.AreEqual(19, a([a->9, b->10]));
|