7.4

Table Of Contents
for(&it,1,1,strtoint(@(1,1,2)))
execpage('DATA')
showpage()
endfor()
endif()
Notes:
l The if(ne(&printermode,0)) statement prevents the program from executing during design.
l The local variable &it is a counter.
Store two lines of input data on one line of the data page
This sample is a user-defined emulation that reads two lines of input data, concatenates them, and stores them as a single line
in the data page buffer. It terminates a data page when it encounters a form feed character. The emulation relies on two
global variables:
Variable: Type: Initialized to: Description:
&second BooleanFalse
The emulation uses this to determine when the current line is a second line of data. It is True
when the current line is a second line of data.
&line string
(the empty
string)
Holds the contents of a first line of data.
Code:
% ====================================================
% STORE TWO LINES OF DATA ON ONE LINE OF THE DATA PAGE
% ====================================================
search(&str,'\014')
set(&current.line,&current.line + 1)
store(&current.line,&str)
doform()
set(&second,false)
clearpage()
endsearch()
if(&second)
store(&current.line,&line + &str)
elseif()
set(&line,&str)
set(&current.line,&current.line + 1)
endif()
set(&second,not(&second))
if(ge(&current.line,&current.lpp))
doform()
clearpage()
set(&second,false)
endif()
Notes:
©2010 Objectif Lune Inc - 240 -