//type manipulation
idFirst= 2250;
idSecond= 5078;
shift="2";
id= (string)idFirst + (string)(idSecond + (int)shift);
a = "Your ID is ";
print(a + id);
//Ispisujem: Your ID is 22505080
Logic manipulation
d= 0;
A= UNDEFINED orTRUE;//A is TRUE
B= notTRUEor d==0andTRUE; //B is TRUE,and has priorityif (B and A)
d=1;
print(d);
//Ispisujem: 1
4.a Simple list
Lot = [4,8];
if (4 in Lot)
print("T");
//Ispisujem: T
4.b List conversion 'LIST -> variables'
//left side can be: env_function that returns a list, LIST or LIST_VAR
v,p = getCoord();
print(p);
L = [ 20 + 4 , 20 + 6 ];
v,p = L;
print(p);
v,p = [2,4];
print(p);
print(L[0]);
//IZ OKOLINE DOBIVENE koordinate: [2,15]//Ispisujem: 15//Ispisujem: 26//Ispisujem: 4//Ispisujem: 24
Tutle example
print("program pocinje s radom");
rot = 90;
x,y= getCoord();
r=getOrientation();
setPower(TRUE);
setSpeed(2);
for (i=0; i < 8 ; i++){
x,y= getCoord();
r=getOrientation();
setSteps(50);
setRot(rot);
if (i == 4) rot = rot-45;
if (i == 4) break;
}
print("program gotov s radom");