6.0

Table Of Contents
106
Language Reference
4
%If &x is an even number
setstyle(&bluefont)
%use the blue font
elseif() %otherwise
setstyle(&Default)
%use the default font
endif()
show('Some text to display')
%Display the text
crlf()
%Skip to the next line
endfor()
IntToFloat (function)
Converts an integer expression into a measure value.
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