SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Jan 2000
    Location
    Manchester, NH 03102
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    String Comparison???

    All, I'm trying to compare two strings using fuzzy verify (or anything that works)... It does not seem to be working correctly and I'm not sure if it's the way I'm performing it. It is returning a true value for strings comparisons that should fail.

    What I'm trying to do:
    1. remove a string value from a field in a database that will contain other text
    take a value of a string that I created
    2. use the string that I removed from the database
    3. create 2nd string from db memo field
    4. compare the two strings to verify that they are not equal (fuzzyVerify?)

    Now, I've gotten everything to work except the comparison of the two strings (which is the biggest part!).

    I don't have to use the MatchStr function but would like something similar. In C I've used strcmp to accomplish this type of compare. Would anyone know the equivalence in 4Test?

    I would appreciate any suggestions available. I have researched the MatchStr function in the help from Silk 5.02 and have not found anything to clarify how to use this. Below I've provided what I've been experimenting with b4 putting into my case.

    I know the fuzzy verify uses (*) to enable rough verifications but the above is returning true on a literal string values...?

    Thanks,
    Brian-


    [This message has been edited by AJ (edited 04-21-2000).]

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Columbus, OH, USA
    Posts
    689
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String Comparison???

    When I do this, I get FALSE. Am I missing something?


  3. #3
    Member
    Join Date
    Jan 2000
    Location
    Manchester, NH 03102
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String Comparison???

    I need to get:
    (test = this test data) RETURNs TRUE
    (test = this data) RETURNs FALSE

    The problem is that the second string may or may not contain the 1st string within.

    I need to verify that the 1st string is there when it needs to be and not there when it's not supposed to be there.

    Brian-

  4. #4
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String Comparison???

    Where are you returning the MatcStr value?

    You're not printing it, it should give you a false.

    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  5. #5
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String Comparison???

    howabout this:
    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  6. #6
    Member
    Join Date
    Jan 2000
    Location
    Manchester, NH 03102
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String Comparison???

    MatchStr seems to only work if the strings are =. I read somewhere that you can use the wildcard b4 or after your comparison but I don't know what the string somparison will be or what to expect it to return. Can I use (*) before and after the compared string?

    I'm going to use the FuzzyVerfiy for now...
    I've gotten it to work now but the Silk manual does say to use this feature minimally. odd?

    FuzzyVerify ("{sOne}", "{sTwo}")

    Thanks, for putting up with my questions!

    Thanks,
    Brian-

  7. #7
    Member
    Join Date
    Jan 2000
    Location
    Manchester, NH 03102
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String Comparison???

    Thanks AJ!

    You answered my question b4 I was finished replying!

    Appreciate the help!

    Brian-

  8. #8
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String Comparison???

    Hello again,

    There are a couple of nice articles about fuzzy verification in Segue@Work, the link is http://customers.segue.com/protected...qa_insider.htm

    (of course you'll need your customer login and id)

    Check those functions out... they can be of more help

    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  9. #9
    Junior Member
    Join Date
    Apr 2000
    Location
    Ottawa, Ontario, Canada
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String Comparison???

    This might be a moot point now. But couldn't you also use StrPos(string, target)? Since TRUE can also be any non-zero number. This would indicate whether or not the string you are searching for exists in the target string.

    Just curious,

    Chris...

    [This message has been edited by Zaed (edited 04-25-2000).]
    Chris Fraser

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:31 AM.

Copyright BetaSoft Inc.