All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class simula.Lang

java.lang.Object
   |
   +----simula.Lang

public final class Lang
extends Object

Constructor Index

 o Lang()

Method Index

 o entier(double)
Returns the greatest integer BELOW the parameter.
 o inint()
Returns an integer number retrieved from the input.
 o inreal()
Returns a real number retrieved from the input.
 o lastitem()
Returns True if there are other items in the input buffer.
 o mod(int, int)
Returns the integer division of the two parameters.
 o outfix(double, int, int)
Prints a floating point number on the screen with a number of fractional digits up to the given amount and aligned to the right in the given field.
 o outimage()
Flushes the screen.
 o outint(int, int)
Prints an integer number on the screen and given the field size aligns the number on the right, preceding it with spaces enough to fill the field.
 o outreal(double, int, int)
Prints out a number in scientific format
 o outtext(String)
Prints a string on the screen.
 o sign(double)
Returns the sign of the given real number.

Constructors

 o Lang
 public Lang()

Methods

 o entier
 public static int entier(double _num)
Returns the greatest integer BELOW the parameter. # Ex: 4.1 -> 4 -3.2 -> -4

Parameters:
_num - The number to floor off
Returns:
the greatest integer BELOW the parameter.
 o inint
 public static int inint() throws SimulaException
Returns an integer number retrieved from the input.

Returns:
an integer number retrieved from the input.
Throws: SimulaException
Error while reading from input.
 o inreal
 public static double inreal() throws SimulaException
Returns a real number retrieved from the input.

Returns:
a real number retrieved from the input.
Throws: SimulaException
Error while reading from input.
 o lastitem
 public static boolean lastitem() throws IOException
Returns True if there are other items in the input buffer.

Returns:
True if there are other items in the input buffer.
Throws: IOException
Error on the input.
 o mod
 public static int mod(int div,
                       int qt)
Returns the integer division of the two parameters.

Parameters:
div - The number to be divided.
qt - The dividing number.
Returns:
the integer division of the two parameters.
 o outfix
 public static void outfix(double _out,
                           int _decimal,
                           int _fieldLen) throws SimulaException
Prints a floating point number on the screen with a number of fractional digits up to the given amount and aligned to the right in the given field.

Parameters:
_out - Number to print.
_decimal - Number of fractional digits.
_fieldLen - Size of the field.
Throws: SimulaException
Error while printing on screen or wrong combination of parameters.
 o outimage
 public static void outimage()
Flushes the screen.

 o outint
 public static void outint(int _out,
                           int _fieldLen) throws SimulaException
Prints an integer number on the screen and given the field size aligns the number on the right, preceding it with spaces enough to fill the field.

Parameters:
_out - Number to print.
_fieldLen - Size of the field.
Throws: SimulaException
Error while printing on screen.
 o outreal
 public static void outreal(double value,
                            int dec,
                            int _fieldLen) throws SimulaException
Prints out a number in scientific format

Parameters:
value - double number to print out
dec - int number of digits to use in fractional part
len - int lenght of field to print into
Throws: SimulaException
Wrong combination of parameters.
 o outtext
 public static void outtext(String _text)
Prints a string on the screen.

 o sign
 public static int sign(double _real)
Returns the sign of the given real number.

Returns:
the sign of the given real number.

All Packages  Class Hierarchy  This Package  Previous  Next  Index