INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: IsEqual  (Read 1003 times)

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
IsEqual
« on: November 21, 2010, 12:57:36 pm »

I have path like
C:\Sound\Classical\...
C:\Sound\Jazz\...

I want to know if Classical is in the path so I use an expression

IsEqual(Classical,FilePath(),8) – this yields 0 all of the time
IsEqual(FilePath(),Classical,8) – this yields a 1 if Classical is in the path.

The tooltip say IsEqual compares 2 values.
It look likes in case of a substring compare this should be interpreted as find the second value in the first value.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Logged
Matt Ashland, JRiver Media Center

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Re: IsEqual
« Reply #2 on: November 21, 2010, 03:16:34 pm »

I'm familiar with Marko's Magnum Opus, great job.

Nowhere is specified that in case of a substring search the sequence  of  the parameters is of importance.

Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: IsEqual
« Reply #3 on: November 22, 2010, 01:32:27 am »

It does now :)

Regardless of the specified mode, the first value is always compared with the second value.

I put a lot of effort into not taking anything for granted when writing that page up. It wasn't easy. I guess that's one that slipped through the net.
Hopefully, you're finding the page otherwise useful.

Regards,
-marko.

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Re: IsEqual
« Reply #4 on: November 22, 2010, 03:35:32 am »

Hi Marko

IsEqual(A,B,param)
When testing for equality sequence doesn't matter
When testing for > or < than of course it does.
In case of a search for a substring there is no logic.
Find A in B or find B in A are both perfectly valid.
I'm inclined to say as we do compare A with B most of the time; find A in B is slightly more 'logical' than find B in A.
However it is clearly documented now.
One suggestion:
Quote
Note that when using compare modes seven and eight, the subject must be given first, and the term to compare for given second


Note that when using compare modes seven and eight, the subject must be given first, and the term to Search For given second

Thanks

Vincent
Logged
Pages: [1]   Go Up