easier way to check for or logic
Author Message
easier way to check for or logic

...
end if

Can that be compressed?

Thanks,
Bodi

Sat, 21 Apr 2001 03:00:00 GMT
easier way to check for or logic
[This followup was posted to microsoft.public.vb.syntax and a copy was
sent to the cited author.]

Quote:
> ...
> end if

> Can that be compressed?

> Thanks,
> Bodi

Hello,

A = Z - 15
B = Z - 16
C = Z - 20
D = Z - 30

MyIF = A or B or C or D

--
Wanna thank me? Sign my GuestBook.
FlyKiller's Coding Room: http://users.atmosphere.be/flykiller
HomePage: http://home.tvd.be/ws36009

Sun, 22 Apr 2001 03:00:00 GMT
easier way to check for or logic
Can it be compressed?  I am not sure if I can read it:

Quote:

Is that;
If x=15 or x=16 or x=20 or x=30 then ....

If that is what your checking for, you can not compress that any
further.  You can shorten the code (if you have many of these to do)
by using an array to tell you if X is one of several values:

Const TestFor = "000000000000001100010000000001"

If Asc(Mid\$(TestFor, X)) And 1 Then ...

LFS

F 10 14 1E

Quote:

> ...
> end if

> Can that be compressed?

> Thanks,
> Bodi

Sun, 22 Apr 2001 03:00:00 GMT

 Page 1 of 1 [ 3 post ]

Relevant Pages