Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%Case function


Old name
%CaseI
Function
The function implements a programmable switch. Result The result is an integer value.
Declaration


Blok kódu
languageesl
themeConfluence
INT %Case(
   INT in Ctrl, 
   INT in Default, 
   INT in Case1, 
   INT in Value1, 
       ... 
   INT in CaseN, 
   INT in ValueN
 )
Parameters


CtrlSwitch control argument - determines which value will be the function result.
DefaultDefault value. This value will be the function result if none of the switch elements matches the control argument.
ValueXSwitch elements. If values of the parameters Ctrl and CaseX are identical, the value of the parameter ValueX will be the function result.
Description
The function gets the value of the parameter ValueX if Ctrl is equal to CaseX. If Ctrl is equal to none of the parameters CaseX, the function gets the value defined in the parameter Default.
Example


Blok kódu
languageesl
themeRDark
%Case(U.Ctrl_PS_GK_Manual,-1, 21,C.Tube02_PS2f_Pol, 22,C.Tube02_PS2a_Pol, 23,C.Tube02_PS2c_Pol)