7.6

Table Of Contents
Code Sample Example
This example uses POS to look for a word in a data selection.
Example
define(&s,string,@(1,10,40)) %Initialize var. with data
if(pos('INVOICE',&s)>0) %Look for the word INVOICE
show('Invoice') %if found, display some text
elseif()
%Otherwise,display something else
show('Sales order')
endif()
ResourceType (function)
Returns the type of a resource. Recall that resources are either images or attachments.
Syntax
resourcetype( name ) integer value
Argument
name
String value that specifies the name of the resource.
Return Values
Return value: Indicates:
0 The resource does not exist or could not be found.
1 A color bitmap.
2 A monochrome bitmap.
3 A grayscale bitmap.
4 An Encapsulated PostScript (EPS) image.
5 A PostScript file.
6 A Portable Document Format (PDF) file.
Code Sample Example
This example sets the variable &resolution to 200 DPI if the resource is a color bitmap, and to 75 DPI if it is not.
Example
if( eq(resourcetype( ‘employee’ ), 1))
&resolution := 200
©2010 Objectif Lune Inc - 525 -