GMU:Einführung ins Programmieren mit Processing/Seminar: Difference between revisions

From Medien Wiki
Line 458: Line 458:


In einem Pseudocode könnte dies so aussehen:
In einem Pseudocode könnte dies so aussehen:
 
<syntaxhighlight lang="cpp">
''for: i=0; i<8; ++i''<br>
for: i=0; i<8; ++i
   ''if: i mod 4 = 0''<br>
   if: i mod 4 = 0
       ''draw yellow-orange rectangle''<br>
       draw yellow-orange rectangle
   ''if: i mod 4 = 1 or 3''<br>
   if: i mod 4 = 1 or 3
       ''draw little squares and a red rectangle between two of them <- from the top to the bottom''<br>
       draw little squares and a red rectangle between two of them // from the top to the bottom
   ''if: i = 2''<br>
   if: i = 2
       ''draw orange rectangle''<br>
       draw orange rectangle
   ''if: i = 6''<br>
   if: i = 6
       ''draw big red rectangle''<br>
       draw big red rectangle
 
</syntaxhighlight>


===Sofastoff===
===Sofastoff===