PDA

View Full Version : Like or not like...



ReneMiner
24-01-2015, 11:47
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?

ErosOlmi
24-01-2015, 14:39
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"

ReneMiner
24-01-2015, 15:17
ahhhh... i just messed it up because it was introduced together i guess. So nothing is broken except my memory :D