Accepted, Not Yet Planned

The information Mark provided should take care of the use case. Unless there is a more significant business value, we do not plan to do anything further.

To increase the variable values for “!flag” to indicate different status of composition of the line.

Currently "!flag" is used in the Xymacro to set the left margin note or the right margin note. Because of the limitation, when the left margin note <ufm1>  margin888 <ufn> and right margin note <ufm> margin999 <ufn> are be set in the same line,

only the right margin note is processed.

Parents
  • There is only 2 states for the !flag, 1 or 0.  It's purpose isn't to indicate other states (i.e. no margin note, left and/or right).  However, if you use the </fg> to simply mark the line AND use number registers (NOT x-register!!!!!), your frills processing macros (not recommended - use Perl - MUCH easier) can not only detect the !flag line(s) but also test the number register values.

    E.g.  #6 for left margin note indicator and #7 for right. Set #6 to '1' for a left margin note and #7 to '1' for a right margin note. Now, when your code checks for a !flag line, it should also test for #6=1 and create the left margin note and #7=1 to create the right margin note.

    If you're short on spare number registers you can 'split' a number register into high and low. In this case you could use #6 high and #6 low.

    To set high: <nsh;6;1>

    To set low:  <nsl;6;1>

    To reset: <nsh;6;0> or <nsl;6;0>

    Now you're code only has to test for !flag and fetch #6. In macros you can do this with <nrh;6> and <nrl;6>. In Perl its a little more interesting as you can only fetch the whole register. You then need to do some Perl math to extract the upper and lower 8 bits of the #6 value.  Use modulo (% 256) to extract the low and divide (/ 256) to extract the high.

Comment
  • There is only 2 states for the !flag, 1 or 0.  It's purpose isn't to indicate other states (i.e. no margin note, left and/or right).  However, if you use the </fg> to simply mark the line AND use number registers (NOT x-register!!!!!), your frills processing macros (not recommended - use Perl - MUCH easier) can not only detect the !flag line(s) but also test the number register values.

    E.g.  #6 for left margin note indicator and #7 for right. Set #6 to '1' for a left margin note and #7 to '1' for a right margin note. Now, when your code checks for a !flag line, it should also test for #6=1 and create the left margin note and #7=1 to create the right margin note.

    If you're short on spare number registers you can 'split' a number register into high and low. In this case you could use #6 high and #6 low.

    To set high: <nsh;6;1>

    To set low:  <nsl;6;1>

    To reset: <nsh;6;0> or <nsl;6;0>

    Now you're code only has to test for !flag and fetch #6. In macros you can do this with <nrh;6> and <nrl;6>. In Perl its a little more interesting as you can only fetch the whole register. You then need to do some Perl math to extract the upper and lower 8 bits of the #6 value.  Use modulo (% 256) to extract the low and divide (/ 256) to extract the high.

Children