|
Skip to a new line: / |
Top Previous Next |
|
When GAMS encounters a / in a put statement, the writing position is moved to the next line and placed in column one. The /'s in putex1.gms skip to the next line or skip several lines depending on the number of /'s used.
put 'Run on ' system.date ' using source file ' system.ifile ///; loop(Destinaton, put 'Report for ' , Destinaton.tl:15 put @40 '------------ Scenario ------------' /; put @41; loop(scenarios,put scenarios.tl:10); put /; loop(source$sum(scenarios, abs(savtransport(Source,Destinaton,scenarios))), put 'Incoming From ' source.tl @35; loop(scenarios, put savtransport(Source,Destinaton,scenarios):10:0); put /; ); put 'Quantity demanded ' @35
Note GAMS does not skip to a new line unless / is used. Thus, in putex4.gms the line
loop(I, put i.tl);
places all the set element names on one line continuously.
i1 i2 i3 i4 i5 i6
But
loop(I, put i.tl /);
places one element per line due to use of the /.
i1 i2 i3 i4 i5 i6 |