eval08.gms : Test $eval with hidden functions

Description

The user has the possibility to hide some of the GAMS functions by symbols with
the same name. In this case, the GAMS function can still be accessed, but needs
to be prefixed with `system.` This test ensures that this works as expected.


Small Model of Type : GAMS


Category : GAMS Test library


Main file : eval08.gms

$title Test $eval with hidden functions (EVAL08,SEQ=858)

$ontext
The user has the possibility to hide some of the GAMS functions by symbols with
the same name. In this case, the GAMS function can still be accessed, but needs
to be prefixed with `system.` This test ensures that this works as expected.


Contributor: Lutz Westermann, March 2021
$offtext

$eval testPi pi
$ifE abs(%testPi%-3.14159265)>1e-8 $abort Expected GAMS Pi, but saw %testPi%

Scalar pi /3/;
$eval testPi pi
$ifE abs(%testPi%-3)>1e-8 $abort Expected User Pi, but saw %testPi%


$eval testPi system.pi-pi
$ifE abs(%testPi%-0.14159265)>1e-8 $abort Expected diff of GAMS Pi and User Pi, but saw %testPi%