Hasan Alrajhi
Hasan Alrajhi

Reputation: 29

GAMS Display style

How do I display a text in GAMS? For example: in MATLAB I can use disp('MATLAB'), then I will get the output as MATLAB.

Is it possible to have like this in GAMS. In fact, I am new with GAMS environment.

Regards

Upvotes: 2

Views: 189

Answers (2)

Jon
Jon

Reputation: 371

There are actually two ways:

  • $log "text to display" if you want it to appear during the compilation phase (and shows only in .log file)
  • display "text to display" ; if you want it to appear during the execution phase (and shows only in .lst file)

Upvotes: 1

Anton
Anton

Reputation: 1538

display "Hi, warning message here!"

... should work. This will appear in your .LST file, which you should get familiar with reading for debugging purposes.

Upvotes: 1

Related Questions