Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
Java Language EssentialsDownload tutorial zip fileEmail this tutorial to a friend
Main menuSection menuGive feedback on this tutorialPrevious panel
Next section
Course Notes
  


Quick reference page 37 of 37


MOVE b TO a
a=b;
MOVE a TO arrayName(index)
arrayName[index]=a;
ADD b TO a
a = a+b; or a+=b;
ADD b TO a GIVING c
c = a+b;
ADD 1 TO a
a++; or a=a+1;
IF conditional
  statements1
ELSE
  statements2
END-IF
if ( conditional ) {
  statements1
}
else {
  statements2
}
EVALUATE conditional 
WHEN value1
  statements1 
WHEN value2
  statements2 
WHEN OTHER
  statements3 
END-EVALUATE
switch (conditional) {
  case value1:
    statements1
    break;
  case value2:
    statements2
    break;
  default:
    statements3
}

PERFORM TEST BEFORE
  UNTIL conditional 
statements
END-PERFORM

while (conditional) { 
  statements
}
PERFORM TEST AFTER
  UNTIL conditional 
statements 
END-PERFORM
do { 
  statements
} while (conditional); 
PERFORM VARYING a
  FROM start BY
  inc UNTIL conditional 
statements
END-PERFORM 
for (a=start;
     conditional;
     a+=inc) {
 statements
}
PERFORM routine. routine();
CALL 'DUMMY-FUNCTION'
  USING arguments.
dummyFunction(arguments);


a EQUAL TO b
a==b for primitive types
a.equals(b) for objects
a NOT EQUAL b
a!=b for primitive types
!(a.equals(b)) for objects
a GREATER THAN b
a>b for primitive types
a GREATER THAN
  OR EQUAL b
a>=b for primitive types
a LESS THAN b
a<b for primitive types
a LESS THAN OR EQUAL b
a<=b for primitive types

a AND b
a&&b for boolean expressions a,b
a OR b
a||b for boolean expressions a,b

copyright 1996-2000 Magelang Institute dba jGuru


Next section
Main menuSection menuGive feedback on this tutorialPrevious panel
PrivacyLegalContact