By Kaare Christian
Modula-2 is a straightforward but strong programming language that's compatible for a large choice of functions. it's in line with Pascal, a profitable programming language that used to be brought in 1970 via Niklaus Wirth. through the 1970's Pascal turned the main greatly taught programming language and it received reputation in technology and undefined. In 1980 Dr. Wirth published the Modula-2 software ming language. Modula-2 is an evolution of Pascal. It improves at the successes of Pascal whereas including the MODULE - a device for ex urgent the relatives among the key components of courses. In advert dition Modula-2 includes low-level beneficial properties for platforms application ming and coroutines for concurrent programming. Programming languages are very important simply because they're used to specific principles. a few programming languages are so constrained that convinced principles cannot be simply expressed. for instance languages that lac ok floating element mathematics are irrelevant for clinical com putations. Languages akin to simple and Fortran that lack recur sion are improper for textual content processing or platforms programming. occasionally a programming language is useable for a undeniable appli cation however it is way from perfect. an exceptional instance is the trouble of writing huge courses in natural Pascal. Pascal is a terrible language for giant jobs since it lacks amenities for partitioning a application viii Preface 6< ; ~~~~er zero\ Sheet steel Tube /" zero (to Affix Eraser to Shaft) ~ hole wood Shaft A Lead middle determine 1. An exploded diagram. into separate items that may be constructed independently.
Read or Download A Guide to Modula-2 PDF
Similar programming: programming languages books
With bill - cargo from Germany
- An Introduction to Python and LaTeX (draft)
- C# von Kopf bis Fuß, Edition: 2. Auflage.
- Como Programar En C, C++ Y Java 4ta ed.
- Symbian OS C++ for Mobile Phones - Volume 3
Extra resources for A Guide to Modula-2
2. Modula-2 Reserved Words and Standard Identifiers Modula-2's reserved words are used to mark the major features of the language. All these words have special meanings that will be explained throughout the remainder of this book. Notice that Modula-2's reserved words are either fully capitalized words or special symbols. Capitalization is important in Modula-2 - the word "and" is not a reserved word but it might be a bad choice for one of your own identifiers because of its confusion with the reserved word AND.
5. Example - The Underline Filter Here is a program that shows how items from InOut are used in a small, but useful application. A friend of ours does most of her writing on a small computer connected to a slow, cheap printer. This particular printer has few "features," but it is capable of underlining. If you send this particular printer a special control code (Control-S) it will subsequently underline the text that it receives. When the printer receives another Control-S it reverts to normal print mode.
Comments often are used as headings * ******** ***** *** **** ** ******** *) Nested comments exist when one comment encloses another. Thus a large section of code can be logically removed from a program by placing it inside comment braces. This works in Modula-2 even if the code already contains comments. Part I. 26 (* Example 1. 3. If you were using a language in which comments did not nest, how would you "comment out" the following FOR loop? (* Example 1. 21 *) (* Print a brief table of squares *) FOR I := 0 TO 9 DO WriteCard(I*I,4) (* Note that I is squared *) END; (Remember that in Modula-2 comments do nest.