Division - Operators '/' and '\'

Code Garden  |  Home   |  Programming  |  Question Forum  |  Contact Us

How do I divide?

    Division is a piece of cake.  You will be using the operators '/' and '\'.  The most important thing to remember is that they return different results.  A '\' will return an integer result, whereas a '/' will return a floating point result.

Examples

    Division resulting in an integer:

number = 10\4  'This will result in a whole number because of the '\' operator

    Division resulting in a floating point number:

number = 10/4  'This will result in a whole number because of the '/' operator

Copyright ©2000 by Kyle Baker.  Please read our disclaimer.