7.4

Table Of Contents
Values of any type. Both expressions must be of the same type.
Code Sample Example
This example shows both ways of comparing two expressions.
Example
if(le(&current.line, 15) )
show('Top of page')
endif()
%Same statement, using the <= operator
if(&current.line <= 50)
show('Top of page')
endif()
Left (function)
Extracts the specified leftmost characters of a string.
Syntax
left( string, number ) string value
Arguments
string
String value from which to extract characters.
number
Integer value specifying how many characters to extract from the beginning of the string.
Code Sample Example
This example prints a string up to a certain position.
Example
define(&data,string,'This is a~sample string')
%Define string
define(&x,integer, pos('~', &data))
%Find tilde
%Print the string up to the tilde character, if found
if(&x>1)
show(left(&data,&x-1))
©2010 Objectif Lune Inc - 298 -