473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Lazy compiling

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
Jun 28 '07 #1
4 1041
This is usually called "short circuit evaluation". See the AndAlso OrElse
keywords...

--
Patrice

"Shahil Shah" <shahil.shah@N0_SPAM23.copeohs.coma écrit dans le message de
news: uE**************@TK2MSFTNGP05.phx.gbl...
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

Jun 28 '07 #2
"Shahil Shah" <shahil.shah@N0_SPAM23.copeohs.comschrieb
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
Jun 28 '07 #3
Thanks

"Armin Zingler" <az*******@freenet.dewrote in message
news:Oy**************@TK2MSFTNGP03.phx.gbl...
"Shahil Shah" <shahil.shah@N0_SPAM23.copeohs.comschrieb
>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

Jun 28 '07 #4
thnaks

"Patrice" <http://www.chez.com/scribe/wrote in message
news:e4**************@TK2MSFTNGP03.phx.gbl...
This is usually called "short circuit evaluation". See the AndAlso OrElse
keywords...

--
Patrice

"Shahil Shah" <shahil.shah@N0_SPAM23.copeohs.coma écrit dans le message
de news: uE**************@TK2MSFTNGP05.phx.gbl...
>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


Jun 28 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vinay Aggarwal | last post by:
I have been thinking about the lazy initialization and double checked locking problem. This problem is explain in detail here http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html...
25
by: Steven Bethard | last post by:
So I end up writing code like this a fair bit: map = {} for key, value in sequence: map.setdefault(key, ).append(value) This code basically constructs a one-to-many mapping -- each value that...
3
by: Jeff Johnson [MVP: VB] | last post by:
What is the point of lazy * and lazy ? ? "Nothing" will always succeed first, right? If not, can someone give me an example of when either of these might be used?
354
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets...
4
by: Siemel Naran | last post by:
What is a good idiom for handling a lazy object? I see 2 good possibilities. Any more, any comments? Which way do people here use? (1) class Thing { public: Thing(double x, double y) :...
9
by: sturlamolden | last post by:
Python allows the binding behaviour to be defined for descriptors, using the __set__ and __get__ methods. I think it would be a major advantage if this could be generalized to any object, by...
39
by: Boltar | last post by:
Why does C do lazy evaluation for logical boolean operations but not bitwise ones? Ie: the following program prints "1 2" , not "1 1" under gcc main() { int a = 1; int b = 1; 0 && ++a;
2
by: fredd00 | last post by:
Hi, i'm trying to use lazy loading with Linq to sql and related objects seems like you can only call the child object if the context is still open, this is not real lazy loading. here is my...
6
by: Peng Yu | last post by:
Hi, I'm wondering if the following assignment is lazy copy or not? Thanks, Peng std::vector<intv. v.push_back(1); v.push_back(2);
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.