/** * BeanShell02.bsh * IJ BAR: https://github.com/tferr/Scripts#scripts * ************************************************* * 2. If statements, for loops and switch statements * ************************************************* */ a = 10; b = 20; // Semicolon separating in-line statements // An if statement: if (a == b) { print("Line 13: " + "a is b!"); } else if (a < b) { print("Line 15: " + "a is smaller than b!"); } else if (a (a property of // array objects) to determine the size of the array (how many // positions it has): intArray = new int[3]; print("Line 51: "+ "Contents of intArray:"); for (i=0; i