Keywords and Builtin Constants

[ Keywords ] [ Builtin Constants ]


Version 1.0 of ALADDIN has only 10 keywords, namely:
     break,        else,         for,      if,    print, 
      quit,  SetUnitsOn, SetUnitsOff,    then,    while

SI and US Units

The following names are reserved for SI and US units:

SI Units   micron, mm,	cm, dm, m, km, g, kg, mg, N, kN, kgf,
           Pa, kPa, MPa, GPa, deg_C, DEG_C, Jou, kJ, Watt, kW,
           Hz, rpm, cps 

US Units   in, ft, yard, mile, mil, micro_in, lb, klb, ton,
           grain, lbf, kips,  psi, ksi, deg_F, DEG_F, gallon,
           barrel, sec,  ms,  min,  hr, deg, rad 

Some Remarks


ALADDIN's built-in constants are:

    Name                Value                            Purpose

      DEG      57.29577951308      Radians to degrees conversion
        E      2.718281828459
    GAMMA      0.577215664901
       PI      3.141592653589

Example 1 : The script of code

    print "1 radian = ", DEG, "degrees \n";
generates the output
    1 radian =       57.3 degrees

Example 2 : To compute the area of a circle, we coupld write:

    radius = 3 cm;
    area   = PI*radius*radius;

    print "circle radius = ", radius, "\n";
    print "circle area   = ",   area (cm^2), "\n";
The program output is:
    circle radius is =          3 cm 
    circle area is   =      28.27 cm^2 

Developed in April 1996 by Mark Austin
Last Modified June 20, 1996
Copyright © 1996, Mark Austin, Department of Civil Engineering, University of Maryland