I.T. Discussion Community!
-Collapse +Expand
VB Classic
Search VB Classic Group:

Advanced
-Collapse +Expand VB Classic Store

Prestwood eMagazine

August Edition
Subscribe now! It's Free!
Enter your email:

   ► KBVB Classic Knowledge Base  Print This    Tips Database All Groups  

VB Classic Tips Page

These Tips are contributed by you (our online community members). They are organized by our knowledge base topics. Specifically, by the VB Classic sub-topics.

Contribute a Tip

1 Visual Basic Classic Tips

Group: Visual Basic Classic


Topic: Tool Basics

1. Mimic Short-Circuit Evalution in VB

Short-circuit evaluation is a feature of most languages where once an evaluation evaluates to False, the compiler evaluates the whole expression to False, exits and moves on to the next code execution line. In VB Classic, the if statement does not support short-circuit evaluation but you can mimic it. Use either an if..else if..else if statement or nested if statements. You will find that your code that makes use of this technique will be clearer and easier to maintain than the short-circuit equivalent and faster than ingnoring the issue.



Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech