Description
This uses the `$if [NOT] onState ...` compilation statement to check the defaul state of certain dollar control options as well as the correct switching of these states. Contributor: Lutz Westermann, September 2021
Small Model of Type : GAMS
Category : GAMS Test library
Main file : dco01.gms
$title Test default state and switching state for dollar control options (DCO01,SEQ=878)
$onText
This uses the `$if [NOT] onState ...` compilation statement to check the defaul state
of certain dollar control options as well as the correct switching of these states.
Contributor: Lutz Westermann, September 2021
$offText
* Check the expected default
$if onState CheckErrorLevel $abort expected OFF state as default for CheckErrorLevel
$if onState Delim $abort expected OFF state as default for Delim
$if onState Digit $abort expected OFF state as default for Digit
$if onState Dollar $abort expected OFF state as default for Dollar
$if onState DotL $abort expected OFF state as default for DotL
$if onState DotScale $abort expected OFF state as default for DotScale
$if onState double $abort expected OFF state as default for double (meaning $single is active)
$if onState Embedded $abort expected OFF state as default for Embedded
$if NOT onState Empty $abort expected ON state as default for Empty
$if onState End $abort expected OFF state as default for End
$if onState EolCom $abort expected OFF state as default for EolCom
$if onState Eps $abort expected OFF state as default for Eps
$if onState EpsToZero $abort expected OFF state as default for EpsToZero
$if onState ExternalInput $abort expected OFF state as default for ExternalInput
$if onState ExternalOutput $abort expected OFF state as default for ExternalOutput
$if onState Expand $abort expected OFF state as default for Expand
$if NOT onState Filtered $abort expected ON state as default for Filtered
$if onState Global $abort expected OFF state as default for Global
$if NOT onState IDCProtect $abort expected ON state as default for IDCProtect
$if onState ImplicitAssign $abort expected OFF state as default for ImplicitAssign
$if NOT onState Include $abort expected ON state as default for Include
$if onState Inline $abort expected OFF state as default for Inline
$if NOT onState Listing $abort expected ON state as default for Listing
$if NOT onState Local $abort expected ON state as default for Local
$if NOT onState Log $abort expected ON state as default for Log
$if NOT onState Macro $abort expected ON state as default for Macro
$if onState Margin $abort expected OFF state as default for Margin
$if onState Multi $abort expected OFF state as default for Multi
$if onState MultiR $abort expected OFF state as default for MultiR
$if onState NestCom $abort expected OFF state as default for NestCom
$if NOT onState Order $abort expected ON state as default for Order
$if onState Recurse $abort expected OFF state as default for Recurse
$if NOT onState StrictSingleton $abort expected ON state as default for StrictSingleton
$if onState SuffixDLVars $abort expected OFF state as default for SuffixDLVars
$if NOT onState SuffixAlgebraVars $abort expected ON state as default for SuffixAlgebraVars
$if onState SymList $abort expected OFF state as default for SymList
$if onState SymXRef $abort expected OFF state as default for SymXRef
$if onState Troll $abort expected OFF state as default for Troll
$if onState UelList $abort expected OFF state as default for UelList
$if onState UelXRef $abort expected OFF state as default for UelXRef
$if onState Uni $abort expected OFF state as default for Uni
$if onState UNDF $abort expected OFF state as default for UNDF
$if onState Upper $abort expected OFF state as default for Upper
$if onState Warning $abort expected OFF state as default for Warning
* Activate all isolated options and check the state
$onCheckErrorLevel
$onDelim
$onDigit
$onDollar
$double
$onEmbedded
$onEmpty
$onEnd
$onEolCom
$onEps
$onEpsToZero
$onExpand
$onFiltered
$onGlobal
$onIDCProtect
$onImplicitAssign
$onInclude
$onInline
$onListing
$onLocal
$onLog
$onMacro
$onMargin
$onNestCom
$onOrder
$onRecurse
$onStrictSingleton
$onSuffixDLVars
$onSuffixAlgebraVars
$onSymList
$onSymXRef
$onTroll
$onUElList
$onUElXRef
$onUni
$onUNDF
$onUpper
$onWarning
$if NOT onState CheckErrorLevel $abort expected ON state for CheckErrorLevel
$if NOT onState Delim $abort expected ON state for Delim
$if NOT onState Digit $abort expected ON state for Digit
$if NOT onState Dollar $abort expected ON state for Dollar
$if NOT onState double $abort expected ON state for double
$if NOT onState Embedded $abort expected ON state for Embedded
$if NOT onState Empty $abort expected ON state for Empty
$if NOT onState End $abort expected ON state for End
$if NOT onState EolCom $abort expected ON state for EolCom
$if NOT onState Eps $abort expected ON state for Eps
$if NOT onState EpsToZero $abort expected ON state for EpsToZero
$if NOT onState Expand $abort expected ON state for Expand
$if NOT onState Filtered $abort expected ON state for Filtered
$if NOT onState Global $abort expected ON state for Global
$if NOT onState IDCProtect $abort expected ON state for IDCProtect
$if NOT onState ImplicitAssign $abort expected ON state for ImplicitAssign
$if NOT onState Include $abort expected ON state for Include
$if NOT onState Inline $abort expected ON state for Inline
$if NOT onState Listing $abort expected ON state for Listing
$if NOT onState Local $abort expected ON state for Local
$if NOT onState Log $abort expected ON state for Log
$if NOT onState Macro $abort expected ON state for Macro
$if NOT onState Margin $abort expected ON state for Margin
$if NOT onState NestCom $abort expected ON state for NestCom
$if NOT onState Order $abort expected ON state for Order
$if NOT onState Recurse $abort expected ON state for Recurse
$if NOT onState StrictSingleton $abort expected ON state for StrictSingleton
$if NOT onState SuffixDLVars $abort expected ON state for SuffixDLVars
$if NOT onState SuffixAlgebraVars $abort expected ON state for SuffixAlgebraVars
$if NOT onState SymList $abort expected ON state for SymList
$if NOT onState SymXRef $abort expected ON state for SymXRef
$if NOT onState Troll $abort expected ON state for Troll
$if NOT onState UelList $abort expected ON state for UelList
$if NOT onState UelXRef $abort expected ON state for UelXRef
$if NOT onState Uni $abort expected ON state for Uni
$if NOT onState UNDF $abort expected ON state for UNDF
$if NOT onState Upper $abort expected ON state for Upper
$if NOT onState Warning $abort expected ON state for Warning
* Deactivate all isolated options and check the state
$offCheckErrorLevel
$offDelim
$offDigit
$offDollar
$single
$offEmbedded
$offEmpty
$offEnd
$offEolCom
$offEps
$offEpsToZero
$offExpand
$offFiltered
$offGlobal
$offIDCProtect
$offImplicitAssign
$offInclude
$offInline
$offListing
$offLocal
$offLog
$offMacro
$offMargin
$offNestCom
$offOrder
$offRecurse
$offStrictSingleton
$offSuffixDLVars
$offSuffixAlgebraVars
$offSymList
$offSymXRef
$offTroll
$offUElList
$offUElXRef
$offUni
$offUNDF
$offUpper
$offWarning
$if onState CheckErrorLevel $abort expected OFF state for CheckErrorLevel
$if onState Delim $abort expected OFF state for Delim
$if onState Digit $abort expected OFF state for Digit
$if onState Dollar $abort expected OFF state for Dollar
$if onState double $abort expected OFF state for double
$if onState Embedded $abort expected OFF state for Embedded
$if onState Empty $abort expected OFF state for Empty
$if onState End $abort expected OFF state for End
$if onState EolCom $abort expected OFF state for EolCom
$if onState Eps $abort expected OFF state for Eps
$if onState EpsToZero $abort expected OFF state for EpsToZero
$if onState Expand $abort expected OFF state for Expand
$if onState Filtered $abort expected OFF state for Filtered
$if onState Global $abort expected OFF state for Global
$if onState IDCProtect $abort expected OFF state for IDCProtect
$if onState ImplicitAssign $abort expected OFF state for ImplicitAssign
$if onState Include $abort expected OFF state for Include
$if onState Inline $abort expected OFF state for Inline
$if onState Listing $abort expected OFF state for Listing
$if onState Local $abort expected OFF state for Local
$if onState Log $abort expected OFF state for Log
$if onState Macro $abort expected OFF state for Macro
$if onState Margin $abort expected OFF state for Margin
$if onState NestCom $abort expected OFF state for NestCom
$if onState Order $abort expected OFF state for Order
$if onState Recurse $abort expected OFF state for Recurse
$if onState StrictSingleton $abort expected OFF state for StrictSingleton
$if onState SuffixDLVars $abort expected OFF state for SuffixDLVars
$if onState SuffixAlgebraVars $abort expected OFF state for SuffixAlgebraVars
$if onState SymList $abort expected OFF state for SymList
$if onState SymXRef $abort expected OFF state for SymXRef
$if onState Troll $abort expected OFF state for Troll
$if onState UelList $abort expected OFF state for UelList
$if onState UelXRef $abort expected OFF state for UelXRef
$if onState Uni $abort expected OFF state for Uni
$if onState UNDF $abort expected OFF state for UNDF
$if onState Upper $abort expected OFF state for Upper
$if onState Warning $abort expected OFF state for Warning
* Check state for DCOs that get set implicitly
$onDotL
$if NOT onState DotL $abort expected ON state for DotL
$if onState DotScale $abort expected OFF state for DotScale
$onDotScale
$if onState DotL $abort expected OFF state for DotL
$if NOT onState DotScale $abort expected ON state for DotScale
$offDotL
$offDotScale
$if onState DotL $abort expected OFF state for DotL
$if onState DotScale $abort expected OFF state for DotScale
$onMulti
$if NOT onState Multi $abort expected ON state for Multi
$if onState MultiR $abort expected OFF state for MultiR
$onMultiR
$if onState Multi $abort expected OFF state for Multi
$if NOT onState MultiR $abort expected ON state for MultiR
$offMulti
$if onState Multi $abort expected OFF state for Multi
$if onState MultiR $abort expected OFF state for MultiR
* The following need to come in pairs and cannot be nested
$if onState ExternalInput $abort expected OFF state for ExternalInput
$onExternalInput
$if NOT onState ExternalInput $abort expected ON state for ExternalInput
$offExternalInput
$if onState ExternalInput $abort expected OFF state for ExternalInput
$if onState ExternalOutput $abort expected OFF state for ExternalOutput
$onExternalOutput
$if NOT onState ExternalOutput $abort expected ON state for ExternalOutput
$offExternalOutput
$if onState ExternalOutput $abort expected OFF state for ExternalOutput