Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

While... Wend Statement

This looping statement executes a series of statements as long as a given condition is True. The syntax of this statement is [Pg.36]

If condition (a logical expression) is True, all statements are executed until the Wend statement is encountered. Control then returns to the While statement and condition is again checked. If condition is stiU True, the process is repeated. If it is not True, execution resumes with the statanent following the Wend statement, while... Wend loops can be nested to any level. Each Wend matches the most recent While. [Pg.36]


We deliberately avoided the use of some elegant constructions as WHILE. .. WEND structure, SWAP statement, ON ERROR condition and never broke up a single statement into several lines. Although this self-restraint implies that we had to give up some principles of structural programming (e.g., we used more GOTO statements than it was absolutely necessary), we think that the loss is compensated by the improved portability of the programs. [Pg.17]

The major difference between a do-until loop and a while-wend loop is that in the DO-UNTIL loop the statements between the do and the until are executed at least once, whereas in the while-wend loop the loop will exit immediately at wend if E cpr is false. An example of a do-until loop is... [Pg.83]

Details concerning the VBA language are covered in Chapter 2. The statement While ActiveCell. Value <> 0 is a looping command that says, in effect, perform all statements below this until the Wend is encountered as long as the value in the ActiveCell (the one where the cursor is) is not zero (or not blank). When this revised Macro is invoked by typing Ctrl/v, the spreadsheet changes to that shown below. As expected, the difference between ideal and non-ideal volume becomes larger as pressure increases. [Pg.12]

The While loop continues as long as the logical (Boolean) statement is True the last statement in the loop range is the Wend. [Pg.28]


See other pages where While... Wend Statement is mentioned: [Pg.36]    [Pg.36]    [Pg.36]    [Pg.204]   


SEARCH



Wends

While

© 2024 chempedia.info