Modula-2

Modula-2 definition - computer

(MODUlar LAnguage-2) An enhanced version of Pascal introduced in 1979 by Swiss professor Nicklaus Wirth, creator of Pascal. It supports separate compilation of modules, allowing it to be used for large projects. The following example changes Fahrenheit to Celsius:

      MODULE FahrToCent;
   FROM InOut IMPORT ReadReal,WriteReal,
   WriteString,WriteLn;
   VAR Fahr:REAL;
   BEGIN
   WriteString("Enter Fahrenheit ");
   ReadReal(Fahr);
   WriteLn;
   WriteString("Celsius is ");
   WriteReal((Fahr - 32) * 5 / 9);
      END  FahrToCent





Computer Desktop Encyclopedia THIS DEFINITION IS FOR PERSONAL USE ONLY
All other reproduction is strictly prohibited without permission from the publisher.
Copyright © 1981-2009 by Computer Language Company Inc. All rights reserved.

Comments


Do you have more to add? Sign in to share your linguistic knowledge or observation.

Connect with Facebook