# “If” Command—Iterations and More using wxMaxima

#### ajmirelesme

##### New member
I am trying to make a program using iterations, but never found in the manual how to do mutiple tasks using the "if" command.
(I am simplifying the program to variables h & i)

I have previously defined functions F(x) and f(x).
Also, that the values of h & i are initially:
i: 0 h: some arbitrary value

This is what I have and what I want to add:
Code:
P(h,i);
block([],
if f(h)>=0
then i:i+1 **(*AND DO ANOTHER TASK* h:F(h))**
else **PRINT i AND PRINT h**
);
Is there a way to actually print the values? Or do I have to manually type i & h separately to see their final values?
Also, if you could please help me understand what the brackets "[]" after "block" could work for in the -if- command.