ij-macro-programming-workshop

Previous            Exercise            Next

Exercise 05.02 - Variables and assignment

Aim:

Create a variable a and assign a value to it. Create a second variable b and assign a to it. Modify the value of b. What is the value of a now?

The macro prints the values of a and b. Did the value of a change when b was modified?

Your code starts after this line

a = 1000;
b = a;
b = b + 500;

Your code ends before this line


print("a: ", a, "b:", b);

> a:  1000 b: 1500

The code below is for automatically checking the result. Please ignore it!


ok = (a!=b);

if (ok) 
	showMessage("That's right. Great, you did it!");
else 
	showMessage("Your result is wrong! Please check your macro and try again!");

Previous            Exercise            Next