User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







objective-c:control_structures:for

Table of Contents

for

syntax

for (initialization; test; continued) statement;
 
or easier
 
for (start value; end value; continued) {
    statement;
}

for example objective c

        NSInteger a;
        for (a=0;a<=99;a++) {
            if (a < 42 || a > 42) {
                NSLog(@"what ? %i", a);
            } else {
                NSLog(@"correct ;)");
            }
        }

output

  ....
  2012-10-12 00:45:34.813 cppApp[39677:c07] what ? 41
  2012-10-12 00:45:34.814 cppApp[39677:c07] correct ;)
  2012-10-12 00:45:34.815 cppApp[39677:c07] what ? 43

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
objective-c/control_structures/for.txt · Last modified: 2024/02/16 01:06 (external edit)

Impressum Datenschutz