sexta-feira, 22 de março de 2013

Pascal Jump Instructions

Control Strucutres - Module 3

2. Linear sequences and non-linear sequences


Until now I've only teached you how to program software that has a linear sequence to it, there are no conditions, the user experience will always be the same. 

Jump Instructions
Control Structures
Subroutines

When you use any of these you are creating a non linear sequence of events.


2.1. Jump Instructions

Instruction 1;
Instruction 2;

goto k

instruction 4;
instruction 5;

k;

instruction k1;
instruction k2;

Consider the program above, when the program reaches the code goto k it would jump to k ignoring instructions 4 and 5.

Jump instructions were used in the past, before languages like Pascal or C (structured programming languages) existed, they were substituted, we now use Control Structures.


0 comentários

Posts a comment

 
© Doc's Workshop
Designed by Blog Thiết Kế
Back to top