Subject Re: [firebird-support] Stored procedure question
Author Helen Borrie
At 08:31 AM 28/08/2003 +0000, you wrote:
>hi
>
>Is it posible in a stored procedure to do someting like this:
>
>for MyVar=1 to length(MyField) do
>begin
> if (MyField[MyVar]='G' then
> something to do.....
>end;

Do you mean "Can we write Pascal in stored procedures?" :-))

(Nooooo...)

But you can do a WHILE loop; and there is a SUBSTRING(..) function and
various UDFs to get lengths of varchars...and Firebird 1.5 has the LEAVE
keyword (similar to Pascal Break).

Unfortunately, chars and varchars are not treated as arrays of char, either.

The procedural language extensions are documented in the LangRef book of
the IB6 beta docs. New goodies are in release notes.

heLen