Drawing a box
Brian K. White
brian at aljex.com
Tue Jun 16 12:55:41 PDT 2009
There are 3 characters in the repeat string.
150 is divisible by 3.
125 is not.
Repeat 125 produces 41 copies of "\g0" and then 2 characters "\g"
You are then appending "\g9" to that, resulting in "\g\g9"
Apparently fp is reading a character after the \g and not noticing that
the particular character was a backslash.
Instead of abandoning the attempt to parse the previous backslash code
and starting over with the new backslash,
It's reading "\g\" and since there is no "g\" character it outputs "?" ,
then, since the \ from \g9 was "eaten" by the previous backslash code,
the remaining "g9" is just plain text and is output as such.
--
bkw
Richard Kreiss wrote:
> 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.
>
>
> 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
>
More information about the Filepro-list
mailing list