Teorija CPP: cestnoprometni predpisi: C, E, D – kat.: (za interno uporabo). Front Cover. Bojan Krajnc. B. Krajnc, – 89 pages. Index of /~slmurko/Teorija in vaje/ROM/Interaktivni raèunalniški teèaji/computing/ cpp. [ICO], Name · Last modified · Size · Description. [DIR], Parent Directory, -. Parent Directory, -. [TXT], BARCHART.C, Feb , K. [TXT], , Feb , K. [ ], , Feb , K.

Author: Mazugul Zoloktilar
Country: Venezuela
Language: English (Spanish)
Genre: Technology
Published (Last): 25 July 2005
Pages: 346
PDF File Size: 15.84 Mb
ePub File Size: 19.19 Mb
ISBN: 573-4-48653-545-6
Downloads: 94317
Price: Free* [*Free Regsitration Required]
Uploader: Kagakus

Therefore it would be nice to declare a new list with something like:.

Index of /~murkos/Teorija in vaje/LAV/Software_/KRMILJA/TC/BIN

Consequently, in cases of errors you can narrow your search to those places which are not proven to be correct. For example, if the same statement sequence is needed at different locations within the program, the sequence must be copied.

This cppp is used in every provided procedure to uniquely identify the list in question. Typically, this requires to write two files: The main program directly operates on global data. What we have shown with the traversing strategy applies to other strategies as well.

In object-orientation, structure is organized by the data.

You then use these operations by providing explicitly the data to them on which they should operate. Ccpp of the program interact by sending messages to each other. Several data structures exist, for example lists, trees, arrays, sets, bags or queues to name a few. Consequently, you have to use a special type ANY which allows to assign data of any type to it. We can illustrate this as shown in Fig. It is now divided into several smaller parts which interact through procedure calls and which form the whole program Fig.

For example, if a procedure is correct, every time it is used it produces correct results.


Ciklopropan — Википедија, слободна енциклопедија

The calls to provided procedures remain the same. Data specifies valid operations.

As you believe that lists are a common data structure, you decide to implement it in a separate module. It is in your responsibility to ensure that your list is used consistently. A procedure call is used to invoke the procedure. Consider the following example which the compiler cannot check for correctness:.

After the sequence is processed, flow of control proceeds right after the position where the call was made Fig. Complex data structures might use already cp; ones. The advantage is, that now the compiler takes care of calling initialization and termination procedures as appropriate.

Thus, it is exactly the other way around: This enables you to change the implementationfor example to use a faster but more memory consuming algorithm for storing elements without the need to change other modules of your program: If you want cppp use a list within a procedure, say, foo you use the following code frame:.

But what, if you need more than one list in one of your programs? We use a simple example to illustrate the particular properties and to point out their main ideas and problems. Interface definitions just describe what is available and not how it is made available.

This chapter is a short survey of programming techniques. Once you leave the scope for example the procedure where the integer was defined the integer is lost.

Integers are declared within a particular scope for example within a procedure. To enable usage of general procedures or groups of procedures also in other teroija, they must be separately available. The append procedure needs a more detailed discussion. With introducing parameters as well as procedures of procedures subprocedures programs can now be written more structured and error free.

This is necessary since you wish to use your list in several different environments, hence, the type of the data elements to be stored in the list is not known beforehand. You all know singly linked lists which use a teorina simple structure, consisting of elements which are strung together, as shown in Fig. Roughly speaking, we can distinguish the following learning curve of someone who learns program:.


For example insertion might be done such that an order over the elements is achieved or not. With modular programming procedures of a common functionality are grouped together into separate modules.

Index of /~murkos/Teorija in vaje/LAV/Software_145/KRMILJA/TC/BIN

However, queues provide access methods to put a data element at the end and to get the first data element first-in first-out FIFO behaviour. Each of these data structures can be characterized by their structure and their access methods. Therefore we would like to be able to define a list similar to the definition of an integer. We will investigate this in more detail in chapter The overall function of the list is always the same, whether we store apples, numbers, cars or even lists.

Structure of a singly linked list. Within this chapter we will use a very simple pseudo code which you should understand immediately. The problem here with modular programming is, that you must explicitly create and destroy your list handles. A code frame for this would look like this:. Consequently, your programs get structured by the data rather than operations. After processing flow of controls proceed where the call was made. A possible solution is to additionally add information about the type to each list element.