Drawing a box
Laura Brody
laura at hvcomputer.com
Tue Jun 16 11:50:41 PDT 2009
Quoting Richard Kreiss <rkreiss at gccconsulting.net>:
> I decided to play a bit with using graphics characters to draw a box
> around a title during output processing.
>
> Here is the code:
>
> ◄ If:
> ◄
> Then: CLS("1","4")
> ◄
> 15 ------- - - - - - - - - - - - - - - - -
> ◄ If:
> ◄
> Then: SHOWCTR("1") "\g7"{repeat("\g0","125"){""{"\g9"
> ◄
> 16 ------- - - - - - - - - - - - - - - - -
> ◄ If:
> ◄
> Then: SHOWCTR("2") "\g.\b5 Checking For members Missing
> Transactions \a->
> 17 ------- - - - - - - - - - - - - - - - -
> ◄ If:
> ◄
> Then: SHOWCTR("3") "\g1"{repeat("\g0","125"){""{"\g3"
> ◄
>
> Here is the results
>
> ┌─────────────────────────────────────────?g9
> │ Checking For members Missing Transactions │
> └─────────────────────────────────────────?g3
>
> Note that line 2 appears correctly with the verticals in the proper place.
>
> Question: Why don't \g9 upper right corner and \g3 lower right
> corner resolve?
>
> When I was used repeat("\g0","150") the right corners resolved properly.
>
I see the problem,....
the REPEAT has 3 characters in the first parameter, but then
in the second parameter, you have "125". You are telling REPEAT
to fill in the 125 character buffer with the 3 characters, but 125
is not evenly divisible by 3, so there is a "leftover" of just "\g".
Then you tack on the corner character, so the result is a mess. You
need to change "125" to "126" and the funky characters will
disappear.
>
> Richard Kreiss
> GCC Consulting
> rkreiss at gccconsulting.net
>
>
>
>
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
--
Laura Brody
+------------- Hudson Valley Computer Associates, Inc ----------+
| PO Box 859; 120 Sixth Street http://www.hvcomputer.com |
| Verplanck, NY 10596-0859 Voice mail: (914) 739-5004 |
+------ PC repair locally, filePro programming globally --------+
More information about the Filepro-list
mailing list