|
lj set element name justification |
Top Previous Next |
|
This attribute controls the width of set element names in the put output. It is addressed using the syntax
Localfileidentifier.lj=number;
or in the example putex9.gms
my1.lj=3;
where 1 is for right, 2 for left and 3 for center. Example: Using the sequence (putex6.gms)
set mine abcdefghijklmnopqrstuvwxyz /a1 seta1 b12345678901234567890 setbabcdefghijklmnopqrstuvwxyz small/; loop(mine, put 'start set element name here $':0 mine.tl:20 '$ end here'/;) put /;
where the items in orange are set element text and the blue items are statements causing those to be output into the put file. In turn, with the default for .lj of 2 we get
start set element name here $a1 $ end here start set element name here $b1234567890123456789$ end here start set element name here $small $ end here
where narrow text entries like a1 and small are flushed left, but the long names like a12345678901234567890 just fill the field.
If we reset lj to 1 we get
start set element name here $ a1$ end here start set element name here $b1234567890123456789$ end here start set element name here $ small$ end here
where we see the narrow entries flushed right. If we reset lw to 3 we get
start set element name here $ a1 $ end here start set element name here $b1234567890123456789$ end here start set element name here $ small $ end here
showing centering of the narrow entries. |