Reference Manual - Table of Contents

Execution Control
Forms and Windows
Controls
Menus
System and Desktop
Graphic Drawing Commands

Animation
QuickTime Movies
Speech
Sound
File I/O
Printing
Serial Ports

Math Functions
String Functions
Date and Time
Memory Buffers
Error Handling
Console Text Window

Events

Direct Memory Access
Direct Mouse Access
Direct Keyboard Access
Code Resource Modules

A - Runtime Error Messages
B - Compiler Error Messages

 

Math Functions

 

Function Summary:
var = Abs ( numeric-expression )
var = Acos ( numeric-expression )
var = And( numeric-expression1, numeric-expression2 )
var = Asin ( numeric-expression )
var = Atan ( numeric-expression )
var = Cos ( numeric-expression )
var = DegToRad ( numeric-expression )
var = Exp( numeric-expression )
var = Int( numeric-expression )
var = Log ( numeric-expression )
var = Mod( numeric-expression1 , numeric-expression2 )
var = Or( numeric-expression1, numeric-expression2 )
var = Pi ( )
var = Power( numeric-expression1, numeric-expression2 )
var = RadToDeg ( numeric-expression )
var = Rnd( min, max )
var = Sin ( numeric-expression )
var = Sqr ( numeric-expression )
var = Tan ( numeric-expression )
var = Xor( numeric-expression1, numeric-expression2 )
var = Not ( numeric-expression )

 

var = Abs( numeric-expression )

This function returns the absolute value of number. The Abs function always returns a positive value representing the absolute of the number.

var = ACos( numeric-expression )

This function returns the inverse cosine of an angle. The ACos function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse.

var = And( numeric-expression1, numeric-expression2 )

This function returns the result of the AND operation on two numeric values.

var = ASin( numeric-expression )

This function returns the inverse sine of an angle. The Sin function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the hypotenuse.

var = ATan( numeric-expression )

This function returns the arctangent of an angle. The ATan function takes the ratio of two sides of a right triangle (number) and returns the corresponding angle in radians. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.

The range of the result is -pi/2 to pi/2 radians. For conversion of degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.

var = Cos( numeric-expression )

This function returns the cosine of an angle. The Cos function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse.

var = DegToRad( numeric-expression )

This function returns a value of radian converted from the numeric-expression which is a value of degrees.

var = Exp( numeric-expression )

This function returns the result of e (the base of natural logarithms, approx 2.718282) raised to a power.

var = Int( numeric-expression )

This function returns the integer value of the numeric-expression..

numeric-expression - This argument can be any valid numeric expression.

var = Log( numeric-expression )

This function returns the natural logarithm of a number. The natural logarithm is the logarithm to the base e. The constant e is approximately 2.718282. You can calculate base-n logarithms for any number x by dividing the natural logarithm of x by the natural logarithm of n as follows: Logn(x) = Log(x) / Log(n)

var = Mod( numeric-expression1, numeric-expression2 )

This function returns the remainder of numeric-expression1 divided by numeric-expression2.

var = Not( numeric-expression )

This function returns the 1 or 0 depending on the result of the numeric expression.

numeric-expression - This argument can be any valid numeric expression.

var = Or( numeric-expression1, numeric-expression2 )

This function returns the result of the OR operation on two numeric values.

var = Pi( )

This function returns the value of Pi to 13 digits, 3.1415926535898.

.

var = Power( numeric-expression1, numeric-expression2 )

This function returns the result of the value of numeric-expression1 be raised to a power of the value of numeric-expression2.

var = RadToDeg( numeric-expression )

This function returns a value of degress converted from the numeric-expression which is a value of radians.

var = Rnd( min, max )

This function returns a random value between and including the min and max values.

var = Sin( numeric-expression )

This function returns the sine of an angle. The Sin function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the hypotenuse.

var = Sqr( numeric-expression )

This function returns the square root of the value represented by the numeric-expression.

var = Tan( numeric-expression )

This function returns the tangent of an angle. Tan takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.

var = Xor( numeric-expression1, numeric-expression2 )

This function returns the result of the XOR (exclusive OR) operation on two numeric values.