meta data for this page
  •  

ibec_Decode

Description

The ibec_Decode function has the functionality of an IF…THEN…ELSE statement.

Syntax

function ibec_Decode(Expression : variant; Search : variant; Result : variant; 
                     [Search : variant; Result : variant]... [; Default : variant]) : variant;
  • Expression is the value to compare.
  • Search is the value that is compared against Expression.
  • Result is the value returned, if Expression is equal to Search.
  • Default is optional. If no matches are found, the ibec_Decode will return Default. If Default is omitted, then the ibec_Decode
  • function will return NULL (if no matches are found).

Example

execute IBEBlock (CityCode integer)
returns (CityName varchar(100))
as
begin
   CityName = ibec_Decode(:CityCode, 1, 'Berlin', 2, 'Rome', 3, 'Bangkok', 'Unknown');
   suspend;
end