Community discussions

Topic Author
Posts: 49
Joined: Tue Oct 07, 2008 8:56 am

string_compare problem

Thu Feb 12, 2009 5:45 am

If I set this as the label for a device:
The description appears as:

This is not correct - string_compare says it returns 0 when the strings are the same/

I think there may be a problem - It is like string_compare is doing the same thing as string_size.
User avatar
just joined
Posts: 14
Joined: Sun Aug 09, 2015 3:00 pm

Re: string_compare problem

Sat May 18, 2019 8:02 pm

Looks like already 10 years passed, but I have the same problem now in 6.44.3 version. It should be fixed!
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: string_compare problem

Tue Jun 04, 2019 5:47 pm

The first post on the probe thread says to use -1 for false...

Cisco CPU
Type: Function
Available: if(oid("")>0, 1, -1)

but -1 is true, try it...
[if(-1,"-1 is true","-1 is false")]

This incorrect information should corrected, anyhow why use -1 for false when 0 is precise unless you are passing a value to another function just use 0.
Great program but fixes are slow if at all.

Who is online

Users browsing this forum: No registered users and 7 guests