Programming Structures: Conditional/Repeat

Programming Structures: Conditional/Repeat
1 / 1
Programming Structures: Conditional/Repeat - slide 1 of 10 Programming Structures: Conditional/Repeat - slide 2 of 10 Programming Structures: Conditional/Repeat - slide 3 of 10 Programming Structures: Conditional/Repeat - slide 4 of 10 Programming Structures: Conditional/Repeat - slide 5 of 10 Programming Structures: Conditional/Repeat - slide 6 of 10 Programming Structures: Conditional/Repeat - slide 7 of 10 Programming Structures: Conditional/Repeat - slide 8 of 10 Programming Structures: Conditional/Repeat - slide 9 of 10 Programming Structures: Conditional/Repeat - slide 10 of 10
Programming Structures: ConditionalRepeat Statements Programming Constructs if .. else while loop for loop C code to Pseudo-C C allows goto as means of transferring control Closer to machine-level programming style Generally considered

Related Topics

Download this presentation From Below

"Programming Structures: Conditional/Repeat" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

01
Programming Structures:
Conditional/Repeat Statements Programming Constructs
if .. else
while loop
for loop<br>
02
C code to Pseudo-C C allows “goto” as means of transferring control
Closer to machine-level programming style

Generally considered bad coding style

But, essential for assembly programming
More explicit control
Directly mapped to assembly instructions<br>
03
if (t)
then-statement;
else
else-statement; Summary 1 while (Test)
Body loop:
if (!Test) goto done;
Body
goto loop
done: if - else while if (!t) goto false;
then-statement;
goto done;
false:
else-statement;
done: Pseudo-C<br>