define(&i, integer, 0)
define(&s, string, '')
define(&curstr, string, '')
define(&prevstr, string, '')
define(&tempstr, string, '')
define(&linecounter, integer, 1)
%Define size of space between lines
define(&gap, measure, 0.15)
%Define max. no. of lines
define(&lines, integer, 5)
&s := stringreplace(stringreplace(XmlGet('/label[1]/body[1]/ncoIssueNote[1]/text[1]'), '\015', ''), '\012', '|')
for(&i, 1, 1, length(&s))
if(mid(&s, &i, 1) = ' ')
if(stringwidth(&curstr) > &Width)
show(&prevstr)
crlf(&gap)
&linecounter := &linecounter +1
if(&linecounter > &lines)
&curstr := ''
exit
endif
&curstr := &tempstr + ' '
elseif()
&curstr := &curstr + ' '
&prevstr := &curstr + ' '
endif()
&tempstr := ''
elseif()
if(mid(&s, &i, 1) = '|')
if(stringwidth(&curstr) > &Width)
show(&prevstr)
elseif()
show(&curstr)
endif()
crlf(&gap)
&linecounter := &linecounter +1
if(&linecounter > &lines)
&curstr := ''
exit
endif
&curstr := ''
elseif()
&curstr := &curstr + mid(&s, &i, 1)
&tempstr := &tempstr + mid(&s, &i, 1)
endif()
endif()
endfor()
show(&curstr)