[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Wrapping of a substring
Christy,
I think this idea can give you what you want :
let $COMMENTS_20001 = ' ' !! $COMMENTS_2000 ! lpad with 27=30-13
! Blanks !
print $COMMENTS_20001 (3, 13) wrap 55 5 STRIP=<13> ON=<10>
etc..
Arnon
-------------------------------------------------------------------
SEMECH SOFTWARE MARKETING LTD.
TEL : (972) - 3 - 5333144
FAX : (972) - 3 - 5333132
Email: <semech@pobox.com>
------------------------------------------------------------------
-----Original Message-----
From: Christy_Zigich <Christy_Zigich@THE-FIRM.NET>
To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
Date: 17/10/98 02:12
Subject: Wrapping of a substring
>Hello to all! I hope that someone can be of some assistance. I am
writing
>an SQR to create a print, my code to print the variable $comments_2000 is
as
>follows:
>
>
>let $COMMENTS_20001 = substr($COMMENTS_2000,1,28)
>let $COMMENTS_20002 = substr($COMMENTS_2000,29,250)
>
>graphic () font 3 8
>let #pos = 30
>print $COMMENTS_20001 (#line, #pos) wrap 28 1 STRIP=<13> ON=<10>
> let #length = #comments_2000_length - 28
> if #length > 0
> add 1 to #line
> let #pos = 13
>
> print $COMMENTS_20002 (#line, #pos) wrap 55 5 STRIP=<13> ON=<10>
> end-if
>
> if #length < 55
> add 1 to #line
> else
>
> if #length < 110
> add 2 to #line
> else
>
>
> if #length < 165
> add 3 to #line
> else
>
>
> if #length < 210
> add 4 to #line
> else
>
> if #length < 222
> add 5 to #line
> end-if
> end-if
> end-if
> end-if
> end-if
>
> do chart-field-acct
>let #pos = 2
>print 'CHART FIELD ACCOUNT:' (#line, #pos)
>print $chart_acct (#line, 15 )
>
>add 1 to #line
>end-procedure !Print-Line-Comments
>
>
>
>
>
>The client wants the first line of the comment to start at position 30 and
>then wrap to the next line starting at position 13.
>
>All of this works, my problem is that the output comments are wrapping in
>the middle of words
>
>Example:
> (#pos 30) Enter any
comments that pert <-- the problem
> (#pos 13) ain to Line 1 here. These comments pertain to Line
>1. These
> comments will print on the PO. The only time
>there seems to be a
> problem is on the first line: the
>$COMMENTS_20001 substr line.
>
>
> Also, I have no embedded carriage returns.
>
>
>
>Thanks for your time,
>Christy Zigich
>
>Christy_Zigich@the-firm.net
>