Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program MODUL
- VAR num lungime;
- VAR num latime;
- VAR num aria;
- VAR num rez;
- VAR bool check:=FALSE;
- PROC main()
- TPErase; !sterge textul din consola
- citeste;
- IF check= TRUE THEN
- TPWrite "Aria nu poate fi calculata";
- ELSE
- calcul lungime, latime \o:=9;
- ENDIF
- robtargets;
- ENDPROC
- PROC citeste()
- TPReadNum lungime, "Introduceti lungimea:";
- TPReadNum latime, "Introduceti latimea:";
- IF lungime < 0 THEN
- TPWrite "Valoarea nu poate fi negativa";
- check:=TRUE;
- ELSE IF latime <0 THEN
- TPWrite "Valoarea nu poate fi negativa";
- check:=TRUE;
- ENDIF
- ENDIF
- IF check= TRUE THEN
- TPWrite "Aria nu poate fi calculata";
- ENDIF
- ENDPROC
- PROC calcul(num lungime,num latime \num o)
- VAR num z:=10;
- VAR num x:=9;
- rez:=z+x;
- aria:=lungime*latime+o;
- TPWrite "Aria unui dreptunghi este "\Num:=aria;!afisare pe teach pendant
- TPWrite "z + x = "\Num:=rez;
- ENDPROC
- PROC robtargets()
- CONST robtarget p1 := [ [600, 500, 225.3], [1, 0, 0, 0], [1, 1, 0, 0], [ 11, 12.3, 9E9, 9E9, 9E9, 9E9] ];
- var num rotatie;
- rotatie:=p1.rot.q1;
- TPWrite "rotatie "\Num:=rotatie;
- !TPWrite "rotatie "\Num:=p1.rot;
- TPWrite "pozitia robot"\pos:=p1.trans;
- ENDPROC
- ENDMODULE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement