Alpha Video Training
Results 1 to 4 of 4

Thread: !$

  1. #1
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,952

    Default !$

    does anyone know what the difference between $ and !$ is? Does one give a faster speed than the other?

  2. #2
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default

    Hi Martin,
    I just looked in the help file index and this is the difference:


    If the "!" does anything like the "!=" then there would be a speed difference as Alpha would be checking all these things to get a result but wouldn't think it should be very significant(but what do I know! ).

    I spoke toooooo soon! I found the correct definition .

    The !$ operator determines whether the character expression on the left of the operator is NOT contained anywhere(whereas $ would be IS) within the character expression on the right. Operations involving the !$ operator return a logical result (i.e., TRUE or FALSE). The string comparison is not case sensitive.

    You probably knew the definition but just wanted to make certain.
    I had to look under Operator Reference for the correct definition.
    Given this definition I wouldn't think either would be faster than the other.
    Mike
    Last edited by MikeC; 05-14-2006 at 03:34 PM.

  3. #3
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,952

    Default

    thanls, Mike.

    I caught the difference.
    somefield="Martin is here"

    "Martin" $ somefield = .t.
    "Martin" !$ somefield = .f.

    I was looking thru "What's new in V7," and thought maybe it was some newer, faster function.

  4. #4
    Alpha Software Employee AaronBBrown's Avatar
    Real Name
    Aaron Brown
    Join Date
    Feb 2001
    Location
    Waltham, MA
    Posts
    2,836

    Default

    str1 !$ str2

    is functionally identical to

    .NOT. (str1 $ str2)

    Quote Originally Posted by martinwcole
    does anyone know what the difference between $ and !$ is? Does one give a faster speed than the other?
    [FONT=Tahoma][SIZE=1][COLOR=Blue]Aaron Brown
    Alpha Software Development Team[/COLOR][/SIZE][/FONT]

Bookmarks

Posting Permissions

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