Previous: Bro Types, Up: Values Overview



3.1.2 Type Conversions

Some types will be automatically converted to other types as needed. For example, a count value can always be used where a double value is expected. The following:

         local a = 5;
         local b = a * .2;

creates a local variable a of type count and assigns the double value 1.0 to b, which will also be of type double. Automatic conversions are limited to converting between numeric types. The rules for how types are converted are given below.