put13.gms : Put to console

Description

With Windows 10 and older `con` as well as `con:` can be used to print to the console,
starting with Windows 11, only `con:` can be used for this.
With GAMS 47 we adjusted the file declaration to automatically replace `con` by `con:`
on the fly on Windows.

Contributor: Lutz Westermann, April 2024


Small Model of Type : GAMS


Category : GAMS Test library


Main file : put13.gms

$title Put to console (PUT13,SEQ=954)

$onText
With Windows 10 and older `con` as well as `con:` can be used to print to the console,
starting with Windows 11, only `con:` can be used for this.
With GAMS 47 we adjusted the file declaration to automatically replace `con` by `con:`
on the fly on Windows.

Contributor: Lutz Westermann, April 2024
$offText

$onEcho > writeToCon.gms
file f1 / 'con' /;
put f1 '#### write to con';
$offEcho

$call.checkErrorLevel gams writeToCon.gms lo=2
$set extra
$if NOT %system.filesys% == UNIX $set extra :
* The log file contains the line "--- Putfile f1 con:"
$call.checkErrorLevel grep -w con%extra% writeToCon.log > %system.NullFile%