7.6

Table Of Contents
Syntax
inttofloat( expression ) measure value
Argument
expression
Integer value to be converted.
Code Sample Example
This example uses a loop to draw a series of blue rectangles.
Example
define(&x,integer,1)
%Define loop variable
setfillcolor([100,100,0,0])
%Fill blue
for(&x,1,1,10)
%Set up loop
%We must convert &x because rectfill
%expects measure values
rectfill(inttofloat(&x)/2,1,0.1,1)
%Draw rectangle
endfor()
Mul (function)
Multiplies two expressions. This is the functional equivalent of the * operator.
Syntax
mul( expression, expression2 ) integer, measure, currency value
Arguments
expression1, expression2
Integer, measure or currency values. Both expressions must be of the same type. The returned value is set accordingly to the
type of the parameters.
Code Sample Examples
Examples 1 and 2 show both ways of multiplying numbers.
Example 1
©2010 Objectif Lune Inc - 533 -