Results 1 to 3 of 3

Thread: Like or not like...

  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170

    Like or not like...

    really nosy today, another question about LIKE this time.

    There's some grey fading indicaction of memory in my head that LIKE would work with STRING-expression and variables - so copies the type of the variable.

    As this
    Dim A As Long
    Dim B Like A ' B would be Long now
    
    but somehow it does not work. Did it work once- or did i just dream this? Has it been changed? Is it broken?
    I think there are missing some Forum-sections as beta-testing and support

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Hi Rene,

    I'm too confused some time. Too options
    LIKE accept a string expression that will evaluate into a type expressed as a string.

    So options are:
    Dim a As Long
    Dim b As a
    Dim c Like "long"
    Dim d Like "lo" & "ng"
    
    Last edited by ErosOlmi; 24-01-2015 at 14:41.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    ahhhh... i just messed it up because it was introduced together i guess. So nothing is broken except my memory
    I think there are missing some Forum-sections as beta-testing and support

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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