Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prog. techniques. Standard prog. techniques Complex programs can be broken down into simpler parts called “Modules” These come in 2 types,“Procedures”

Similar presentations


Presentation on theme: "Prog. techniques. Standard prog. techniques Complex programs can be broken down into simpler parts called “Modules” These come in 2 types,“Procedures”"— Presentation transcript:

1 Prog. techniques

2 Standard prog. techniques Complex programs can be broken down into simpler parts called “Modules” These come in 2 types,“Procedures” and “Functions This allows multiple programmers to work on the same project at the same time This means you can assign more complex modules to higher level programmers

3 E.G school reports

4 Parameters variables passed to modules Can be declared when calling the module or declared inside the module itself These are known as “Local” variables Local variables reset once the module is exited Variables that have to be used by multiple modules are called “Global” variables

5 Calling procedures When a procedure is called, the computer has to save the location of the current module so that it can return once finished This is ok for simple programs when only 1 procedure is called at a time but when multiple procedures need to be called, the computer has to store the locations in order This can be done through the use of a stack (first in, last out)

6 Defining syntax Languages do not evolve but are invented The language must stick to a set of rules so that the translator can run correctly Each set of rules are language specific “for i = 0 to 5” in VB For(i=0;i<=5;i++){ in AS2

7 Terminal symbols These are the base characters (e.g. A, B, C, 1, 2, 3, etc) ABC is a combination of letters – can be described as “Letter, letter, letter” A is not a combination as it is a base character

8 BNF In BNF, you can define combinations using this syntax ::= “Is defined as” | “Or” E.g. ::= This allows words exactly 3 characters large To allow for unlimited characters, you can nest the definition E.G ::= |

9 Syntax Diagrams This is a more visual method for defining syntax Combinations are shown in flow graph format E.G

10 Reverse Polish


Download ppt "Prog. techniques. Standard prog. techniques Complex programs can be broken down into simpler parts called “Modules” These come in 2 types,“Procedures”"

Similar presentations


Ads by Google