Hi,

I wan't to check a string for the presence of a particular character, which 
strchr() does perfectly:

-->strchr( 'fred', 'r' )
 ans  =
 red   
 
-->strchr( 'fred', 'b' )
 ans  =
 

But then I want to take some action based on the result, and my attempts to use 
strchr() as a boolean fail:

->if strchr( 'fred', 'r' ), then disp( 'found' ), else disp( 'not found' ), end;
                         !--error 44 
Wrong first argument.
 
Wrong first argument to what??

Thanks, Buk.

____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!



_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to