Looping Through Code
Looping allows you to run a group of statements repeatedly. There are two types of loops:
- For...Next: Uses a counter to run statements a specified number of times.
- Do...Loop: Loops while or until a condition is True.
When using conditional statements that test for zero voltage/current, it is important to note that a real voltage or current should not be trusted to be exactly zero, even when it should be. Typically, the voltage or current is often on the order of 'epsilon' (1e-16) or smaller; hence, it is nonzero in value.