Le 1 sept. 06 à 21:49 Soir, Brendan Murphy a écrit:
OK, this if for the newbies to REALbasic out there. Here are some
common tricks for speeding up your code. I have listed some of the
most common tricks I have seen and used. If anybody else any other
tricks that they would like to share, please feel free to share
them. An old dog can learn new tricks!
Also, when you use "if" expressions where a boolean is evaluated, you
should avoid using "=true" or "=false".
Slower:
dim b as boolean
if b=true then
DoSomething
end if
Faster:
dim b as boolean
if b then
DoSomething
end if
The slowest method first evaluates "b", then evaluates "true" and
then checks for the equality. It does "DoSomething" if the equality
is true.
The fastest method evaluates "b". It does "DoSomething" if "b" is true.
For false, use
if not b then
instead of
if b=false then.
But I don't know if
if b=false then
is faster than
if not b<>not true then
I wonder..._______________________________________________
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>