Abstract

This chapter discusses loops and subscripted variables. All loops can be programmed by means of the IF statement. The use of the FOR and NEXT statement does, however, provide a more elegant and economic method of programming loops. This statement is designed especially for looping and keeping counters, in contrast to the IF statement that has many other uses (such as testing for input errors) besides controlling loops. The FOR statement gives control of looping with fewer instructions than the use of IF, while the testing of the count is automatic. This statement also makes programs more readable and comprehensible. The initial and terminal values and the increment can be variables, constants, or arithmetic expressions.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.