ibec_Decode

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).

Description

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

Example

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

back to top of page
<< ibec_CopyToClipboard | IBEBlock | ibec_Length >>