Subject Re: [ib-support] Re: Variables in Stor Proc
Author Todd Brasseur
You would probably only forget once or twice.

I have had this problem. Now whenever I write a procedure I think about
this. Before I test for a value in a variable I always initialize it.
Now it is as second nature as declaring the variable.

Todd

Sandeep wrote:

> On 29 Apr 2002 at 6:41, csswa wrote:
>
> > Do the comparisons make sense when considering that declared
> > variables are NULL by default and therefore cannot be used in
> > comparisons until they receive a value? e.g. something compared to
> > NULL is always NULL; something added to NULL is always NULL; etc.
>
> If I have a proc like this
>
> create procedure procA
> as
> declare variable a integer;
> begin
> stm1
> .
> .
> .
> stm100
>
> if (a > 5)
> then exit;
>
> suspend;
> end
>
> In this case one could forget to initialize variable 'a' (atleast I
> could), and it would take a
> long time to find the source of error.
>
> Regards
>
> Sandeep
>
> Software Developer
> CFL
> sandeep@...
> http://www.cfl.co.nz
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]