| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Provides a functional equivalent for the DO CASE statement.
HB_DecodeOrEmpty( <xInitVal> , ;
<xCase1>, <xRet1> , ;
[<xCaseN>, <xRetN>], ;
[<xDefault>] ) --> xReturn
or
HB_DecodeOrEmpty( <xInitVal>, ;
<hHash> , ;
[<xDefault>] ) --> xReturn
The function works exactly the same as HB_Decode(): it returns the value <xRet> when <xInitValue> matches <xCase>. If no match is found <xDefault>, if specified, is returned. The difference to HB_Decode() is the default return value when no match is found and <xDefault> is not specified: the function returns an empty value of the same data type as <xInitVal> as default.
| See also: | HB_Decode() |
| Category: | Conversion functions , xHarbour extensions |
| Source: | rtl\decode.prg |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
http://www.xHarbour.com