.Lw set element name width

Top  Previous  Next

This attribute controls the width of set element names in the put output.  It is addressed using the syntax

 

Localfileidentifier.lw=number;

 

or in the example putex6.gms

 

my1.lw=12;

Example:

Using the sequence (putex6.gms)

 

set mine abcdefghijklmnopqrstuvwxyz

/a12345678901234567890  setaabcdefghijklmnopqrstuvwxyz

 b12345678901234567890  setbabcdefghijklmnopqrstuvwxyz

 small smallone/;

loop(mine,

put 'start set element text here $' mine.tl '$ end here'/;)

put /;

 

where the items in orange are the text for set element names and the blue items are statements causing those to be output into the put file. In turn with the default for .lw of 12 we get

 

start set element name here $a12345678901$ end here

start set element name here $b12345678901$ end here

start set element name here $small       $ end here

 

where short text entries like small are padded with trailing blanks but the long names like a12345678901234567890 are truncated to their first 12 positions a12345678901 compared to the full set element name specified just above.

 

If we reset lw to 20 we get

 

start set element name here $a12345678901234567890         $ end here

start set element name here $b12345678901234567890         $ end here

start set element name here $small                         $ end here

 

It we reset lw to 0 we get

 

start set element name here $a12345678901234567890$ end here

start set element name here $b12345678901234567890$ end here

start set element name here $small$ end here

 

showing the exact width and full contents.