meta data for this page
  •  

ibec_Pos

Returns the index value of the first character in a specified substring that occurs in a given string.

Description

No additional description…

Syntax

function ibec_Pos(Substr: string; S : string): integer;

Example

execute IBEBlock
returns (vcresult varchar(100))
as
begin
  for select rdb$relation_name
      from rdb$relations
      into :sname
  do
  begin
    sname = ibec_trim(sname);
    vcresult = '';
    if (ibec_Pos('RDB$', sname) = 1) then
      vcresult = sname || ' is a system table';
    else if (ibec_Pos('IBE$', sname) = 1) then
      vcresult = sname || ' is an IBExpert table';
    else
      vcresult = sname || ' is an user table';
    suspend;
  end
end