Re: Strange behaviour of case
Posted in 2004
Topics: Stored Procedures & SPL, Versions, Editions & End-of-Life
Try putting lib() in braces (lib()) Rgds Preetinder Michael Krzepkowski wrote: >Running on Suse 9.0, IDS 9.40, RDS 7.32UC1 > >The following code example always displays "other". >The value retrieved by select is '3' (one char) > >Works fine with 7.20UD7 on sco. > >database master_db >define g_one_char char(1) >MAIN >case lib() >when '1' > display 'one' >when '2' > display 'two' >when '3' > display 'three' >when '9' > display 'error' >otherwise > display 'other' >end case >END MAIN >FUNCTION lib() >define ret_val char(1) >select orders_by into ret_val >from global >return ret_val >END FUNCTION > > >Is this a known bug? Should I log a call? > >TIA > >Michael > > > > > > sending to informix-list
Preetinder Dhaliwal wrote: > Try putting lib() in braces (lib()) > > Rgds > Preetinder Didn't make any difference. Thanks. Michael > > Michael Krzepkowski wrote: > > >>Running on Suse 9.0, IDS 9.40, RDS 7.32UC1 >> >>The following code example always displays "other". >>The value retrieved by select is '3' (one char) >> >>Works fine with 7.20UD7 on sco. >> >>database master_db >>define g_one_char char(1) >>MAIN >>case lib() >>when '1' >> display 'one' >>when '2' >> display 'two' >>when '3' >> display 'three' >>when '9' >> display 'error' >>otherwise >> display 'other' >>end case >>END MAIN >>FUNCTION lib() >>define ret_val char(1) >>select orders_by into ret_val > >>from global > >>return ret_val >>END FUNCTION >> >> >>Is this a known bug? Should I log a call? >> >>TIA >> >>Michael >> >> >> >> >> >> > > > sending to informix-list