Presentation is loading. Please wait.

Presentation is loading. Please wait.

SDP Languages and Environments. Types of Languages and Environments There are 4 main types of language that you must be able to describe at Higher level.

Similar presentations


Presentation on theme: "SDP Languages and Environments. Types of Languages and Environments There are 4 main types of language that you must be able to describe at Higher level."— Presentation transcript:

1 SDP Languages and Environments

2 Types of Languages and Environments There are 4 main types of language that you must be able to describe at Higher level. At Intermediate level you do not have to be able to describe them! They are: 1.Procedural 2.Declarative 3.Event Driven 4.Scripting

3 Procedural Programs generated in procedural languages involve a sequence of operations and are often described as linear programs. Written as an ordered sequence of steps that describe exactly what it must do at each step. They have a distinct Start and End point and follow through these steps in order.

4 Procedural Example Example of a Procedural Algorithm to ‘Make Tea’ 1.Fill the kettle 2.Boil Water 3.Put tea bag in pot 4.Fill pot with boiling water 5.Pour tea in cup 6.Add sugar/milk if required 7.Stir 8.Drink

5 Declarative Completely different from procedural language! Instead of instructions telling computer what to do, declarative languages state what has to be done. They contain a series of statements: Hot(Tea) – Means tea is hot. Cold(Milk) – Means milk is cold. Which are used to describe facts: Dissolves( x, y) : sugar(x), hot water(y) This means x dissolves in y.

6 Declarative These facts and rules make up a knowledge base (used in expert systems). When you search for the knowledge in the database the declarative language is able to offer you information and meaning behind the data. You will not have to learn Declarative languages, merely describe them and compare them with other types!

7 Event Driven You have all used one of these! VB is Event Driven. It has a form where objects can be placed, so you can design the interface first. It is much quicker to design the HCI as a result. There are no definite Start and End points like a Procedural program.

8 Event Driven Users can interact with the program by selecting buttons, menus or windows. These interactions like button clicks are called events. Event driven simply means ‘controlled through certain events’. An operating systems like Windows is an advanced event driven program.

9 Scripting There are two types. –Embedded ones within an application like MS Word or Excel. –Non embedded ones that work with the OS. Applications that provide scripting capability allow the user to extend the functionality of the application by programming a sequence of actions. Making a script allows you to tailor the application to your needs.

10 Benefits of scripting languages One of the main benefits of scripted languages is that they require no compilation. The language is interpreted at run-time so the instructions are executed immediately. Scripting languages also have a simple syntax which, for the user: – makes them easy to learn and use – assumes minimum programming knowledge or experience – allows complex tasks to be performed in relatively few steps – allows simple creation and editing in a variety of text editors – allows the addition of dynamic and interactive activities to web pages

11 Macros A macro can be created by recording a sequence of keystrokes and mouse actions or entering a suitable script. A macro may be edited by making changes to its code. (Editing the script.)


Download ppt "SDP Languages and Environments. Types of Languages and Environments There are 4 main types of language that you must be able to describe at Higher level."

Similar presentations


Ads by Google