Strip unwanted characters.
ArborX


Summary

A problem with using the wdb macro to extract the data from a Arbortext APP dialogue box is that in many cases the data you want to examine is enclosed in either ( ) or [ ] characters, representing either the system or document defaults for a particular setting. In order to examine these sensibly you must strip the unwanted ( ) or [ ] characters:

A slightly simpler version of the same script avoids using loops by including the operations on the ^typeface variable on the same line as the tests. This makes the script a few characters longer, admittedly, but perhaps gains in clarity:

 ^parenthesis=( 1
 ^bracket=[ 2
 wdb "typeface" 3
 tf 4
 ^tmp=^typeface 5
 ^tmp[..1 6
 ?=^tmp,^parenthesis }strip 7
 ?=^tmp,^bracket }strip 8
 }nextstep 9
 :strip 10
 ^typeface[2.. 11
 ^typeface]2.. 12
 :nextstep 13
 ^parenthesis=( 14
 ^bracket=[ 15
 wdb "typeface" 16
 tf 17
 ^tmp=^typeface 18
 ^tmp[..1 19
 ?=^tmp,^parenthesis (^typeface[2..):(^typeface]2..) 20
 ?=^tmp,^bracket (^typeface[2..):(^typeface]2..) 21

Document created on 08-Feb-2003 (revision 1)