[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: WRAP problem, I guess (long)
Bob,
Another idea would be to use the wrapdepth function which returns the number
of lines a wrapped string will occupy. See the SQR reference manual for
details.
Andy
PS. Have you set up a header on the page? I seem to remember that
#current-line gives the current line number including the header lines, but
when you use PRINT it sees line 1 as number of header lines + 1.
eg
Line 1 Header
2 Header
3 Header
4 Header
5 Detail
6 Detail
7 Detail
So if you are on line 6 above, #current-line will contain 6, while to print
on this line you should use 2 (6-header lines)
-----Original Message-----
From: Emil Galicinao [mailto:e.galicinao@MOTOROLA.COM]
Sent: 23 August 2001 03:41
To: SQR-USERS@list.iex.net
Subject: Re: WRAP problem, I guess (long)
Hi Bob,
Another way of coding it is to use the KEEP-TOP argument then use the
#num_sig_lines to position your #rx_num. With this I believe that there is
no
need for additional variables like #shift_line or SHIFT_COL.
BTW, does the variable #rx_num also contain "Rx#:"? (I assume that its just
3047)
-regards
emil
print $drug_name (+1,1)
print $sig_lines (+1,1) wrap 30 #num_sig_lines KEEP-TOP
print $shift_letter (,+1)
print #rx_num (+#num_sig_lines,1)
Bob Helm wrote:
> I have a funky format problem. I think it has to do with the wrap
function.
> Basically my code looks like this:
>
> print $drug_name (+1,1)
> let #shift_line = #current-line
> print $sig_lines (+1,1) wrap 30 #num_sig_lines
> print '' (#shift_line,{SHIFT_COL}) !to get back to the proper line
> print $shift_letter (+1,{SHIFT_COL})
> print #rx_num (+1,1)
>
> in an attempt to output this:
>
> AMOXICILLIAN 250MG/5M
> TAKE (2.5 ML) ORALLY EVERY 8 HOURS A
> AS SCHEDULED AT 1-9-17 Q8H1 GIVE
> 2.5 ML FOR DOSE
> Rx#: 3047
>
> where the 'A' is the shift letter.
> However, it mysteriously skips two lines and looks like this:
>
> AMOXICILLIAN 250MG/5M
> TAKE (2.5 ML) ORALLY EVERY 8 HOURS
> AS SCHEDULED AT 1-9-17 Q8H1 GIVE
> 2.5 ML FOR DOSE A
>
> Rx#: 3047
>
> This throws everything off.
> When I debug and view #shift_line before the $sig_lines wrap
> and then afterwards, it is the same value, but clearly does not print as
> such.
>
> Any ideas, advice, or explanation will be greatly appreciated.
>
> Thanks,
>
> B
> The Programmer formerly known as Bob
> Mediware Information Systems Inc.
> (913) 307-1045
> Bob.Helm@Mediware.com