Le 2 sept. 06 à 23:12 Soir, Terry Ford a écrit:
Slower:
dim b as boolean
if b=true then
DoSomething
end if
Faster:
dim b as boolean
if b then
DoSomething
end if
I doubt if it is that much faster unless it is in an extended loop.
Maybe a few milliseconds. It is easier to type, however.
Indeed, it is intended to be used in loops.
But I don't know if
if b=false then
is faster than
if not b<>not true then
I wonder.
It compiles and is valid if b=False but is quite unusual usage.
Yes, that's obvious.
Using parentheses it would look like:
If Not(b<>(not (true))) Then
I like that form.
Faster? Probably not consequential. Confusing? Most definitely.
Confusing... It depends on how much you pay attentions to what you read.
But, please, don't blame me. This tip (to not use b=true) was told by
someone (an expert who we see on this list). It "can" improve speed
when used in loops (after all, many tips already said on this thread
are designed for loops)._______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>