Dear Stephan, It did work for me as well until I compiled the code (by accident) instead of running right away. Now I get the error and cannot execute the macro anymore.
I looked at the way Visual Basic uses StrComp and it uses 3 arguments (String s1, String s2, int CompareMode) where you can specify if the check is case sensitive or not. In C strcmp uses 2 arguments like your example. So where did you find the info on the StarBasic runtime functions? I cannot seem find them, could be because it is monday today.. Regards, Sven > -----Original Message----- > From: Stephan Wunderlich - Sun Germany - ham02 - Hamburg > [mailto:[EMAIL PROTECTED] > Sent: maandag 29 augustus 2005 13:54 > To: [email protected] > Subject: Re: [dev] starbasic & strcmp function > > > Hi Sven, > > > Could someone point me to the correct usages of StrCmp in StarBasic? > > With: > > strcmp(s1,s2) > > that is a typo I suppose. > > > I get the following error: > > > > "Basic syntax error. Symbol StrComp already defined differently." > > > > But where is it defined? > > StrComp is a basic-runtime function and something like > > s1 = "openoffice.org" > s2 = "writer" > s3 = "openoffice.org" > msgbox strcomp(s1,s2) '-1 > msgbox strcomp(s2,s1) '1 > msgbox strcomp(s1,s3) '0 > > works just fine for me. > > Regards > > Stephan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
