ANNEXED B Introduction to the use of pseudocodigo: The use of pseudocodigos to narrate complex processes is widely known between the Literature of Systems. It is used to simulate you order to the computer without having to know nor to write in no programming language in special. Although in this work pseudocodigo is used designed by the author, the basic guidelines adjust to the parameters of any existing code in the bibliography { Gane and Sarsons (1983) } offers ample examples for the interested reader. The standard procedure to solve any operation with the computer by means of the programming consists of dividing to the problems in a series of actions or simple steps. A complex action consists then of the concatenation of these simple steps. The passages to basic actions that must get up in everything pseudocodigo are the following ones: Allocation of values to variables Supóngase that is desired to work with values 100 and 200 sentences X = 100 and = 200 creates two numerical variables to which it assigns the mentioned values. Accomplishment of mathematical operations with the values stored in the variables The value stored in a variable must be able to be changed by means of the use of mathematical, logical operators or of chain of characters. To the effects of the Pseudocodigo, if it is desired to add 1 unit to him to the value stored in variable X is designated: X = X+1, denoting with it the sum of a unit to the previous value of the variable and the storage of this result like new value of the same one: Examples: X = Y+1 the new value of X happens to be the 1 and but value X = Y^2 the new value of X happens to be the elevated value of and to the square X = X^2 the new value of X happens to be the old value of X elevated to the square X = X*Y the new value of X happens to be the old value of X by and X = X - and the new value of X less happens to be the old value of X and X = X/Y the new value of X passes to be the old value of X divididoY X = 2*(Y^2) the new value of X happens to be the old value of 2y to the square By means of these procedures, it is possible to recalcular functions automatically. Changing the value of the variable and for I complete example, we automatically obtain a new value of consisting of X the turn out to elevate the value to the square and of multiplying it by 2. Conditions logics A logical condition consists of a clause that can be responded with the values True or False The question Is equal X to one? (X = 1? single it can be responded Like True or False The clause WHILE it establishes like condition that an event or variable has a certain value. Thus WHILE X = 1, establishes like condition that something is going to be made or let itself do when variable X has value 1 Conditional Expressions: (Calls also expressions IF/THEN/ELSE) Everything pseudocodigo must have structures that use the conditions in such a way that they express: If it happens a determined condition, then it does something If it does not happen a then certain condition it does not do anything Example: If the value of X is greater than the value of and then the program finishes If it has not been arrived at the end of a data base, then it continues looking for If there is a then error it warns the operator of the same one If X = 1 then and = Y+1 Conditional and unconditional action for improper delivery Everything pseudocodigo must have an instruction to order when an action must be repeated and one that it indicates to where it is due to repeat while a condition is fulfilled until a condition is fulfilled always I number certain of times You order them then to have to order: TO DO (THE FOLLOWING THING) WHILE OF IT FULFILLS A CONDITION Order 1 Order 2 Order 3 TO RETURN TO BEGIN Generically this means that you order 1.2 and three were executed in sequence whereas the specified condition is fulfilled. Examples: X = 0 And = 0 TO DO WHILE X IS SMALLER TO 1000 AND = Y*X X = X+1 TO RETURN TO BEGIN This example accumulates in the variable and the factorial one of 1000 (calculates thousand times the previous value multiplied by each new digit is to say: Factorial of 1000 = 1*2*3*4*5...... *1000 TO GO TO THE FIRST REGISTRY OF A DATA BASE TO DO WHILE IT IS NOT THE AIM OF THE BASE And = Y+ (the wage of the Employee of the Registry) TO GO TO THE FOLLOWING REGISTRY TO RETURN TO BEGIN This example accumulates in the variable and it name it wage of the data base One hopes that these examples offer to the reader a summary vision of this tool to the aims to interpret the pertinent examples of the main part of the work. For greater detail, { Gane and Sarsons (1983) } offers vast material on pseudocodigos. Aim of the Annexed B Previous Pagina Following Pagina
Make your own free website on