Lazy compiling

  • Thread starter Thread starter Shahil Shah
  • Start date Start date
S

Shahil Shah

Hi

Do you know if the vb 2003 compiler implements lazy compilation?

For e.g:

IF test1 OR test2 THEN
do something
END

If test1 is evaluated to be TRUE then the compiler should not bother
evaluating test2 and go into the IF block.

How can this be activated?

Thanks

Shahil
 
Shahil Shah said:
Hi

Do you know if the vb 2003 compiler implements lazy compilation?

For e.g:

IF test1 OR test2 THEN
do something
END

If test1 is evaluated to be TRUE then the compiler should not bother
evaluating test2 and go into the IF block.

How can this be activated?

Use OrElse.



Armin
 
This is usually called "short circuit evaluation". See the AndAlso OrElse
keywords...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top