All Packages Class Hierarchy This Package Previous Next Index
Class simula.Lang
java.lang.Object
|
+----simula.Lang
- public final class Lang
- extends Object
-
Lang()
-
-
entier(double)
- Returns the greatest integer BELOW the parameter.
-
inint()
- Returns an integer number retrieved from the input.
-
inreal()
- Returns a real number retrieved from the input.
-
lastitem()
- Returns
True
if there are other items in the input buffer.
-
mod(int, int)
- Returns the integer division of the two parameters.
-
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.
-
outimage()
- Flushes the screen.
-
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.
-
outreal(double, int, int)
- Prints out a number in scientific format
-
outtext(String)
- Prints a string on the screen.
-
sign(double)
- Returns the sign of the given real number.
Lang
public Lang()
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.
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.
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.
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.
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.
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.
outimage
public static void outimage()
- Flushes the screen.
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.
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.
outtext
public static void outtext(String _text)
- Prints a string on the screen.
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