Small Basic API Reference
Arguments

The Arguments object provides operations to access the command-line arguments that were passed at the start of this program.

Array

This object provides a way of storing more than one value for a given name. These values can be accessed by another index.

Clock

This class provides access to the system clock

Desktop

This class provides methods to interact with the desktop.

Dictionary

This class provides access to an online Dictionary service.

File

The File object provides methods to access, read and write information from and to a file on disk. Using this object, it is possible to save and open settings across multiple sessions of your program.

Flickr

This class provides access to Flickr photo services.

GraphicsWindow

The GraphicsWindow provides graphics related input and output functionality. For example, using this class, it is possible to draw and fill circles and rectangles.

ImageList

This class helps to load and store images in memory.

Math

The Math class provides lots of useful mathematics related methods

Mouse

The mouse class provides accessors to get or set the mouse related properties, like the cursor position, pointer, etc.

Network

This private helper class provides network access methods

Program

The Program class provides helpers to control the program execution.

Shapes

The Shape object allows you to add, move and rotate shapes to the Graphics window.

Sound

The Sound object provides operations that allow the playback of sounds. Some sample sounds are provided along with the library.

Stack

This object provides a way of storing values just like stacking up a plate. You can push a value to the top of the stack and pop it off. You can only pop the values one by one off the stack and the last pushed value will be the first one to pop out.

Text

The Text object provides helpful operations for working with Text.

TextWindow

The TextWindow provides text-related input and output functionalities. For example using this class, it is possible to write or read some text or number to and from the text-based text window.

Timer

The Timer object provides an easy way for doing something repeatedly with a constant interval between.

Turtle

The Turtle provides Logo-like functionality to draw shapes by manipulating the properties of a pen and drawing primitives.


Math

The Math class provides lots of useful mathematics related methods

Properties

Pi (This property is read-only.)

Math.Pi

Gets the value of Pi

Methods

Abs

Math.Abs(number)

Gets the absolute value of the given number. For example, -32.233 will return 32.233.

number

The number to get the absolute value for.

Returns

The absolute value of the given number.

Ceiling

Math.Ceiling(number)

Gets an integer that is greater than or equal to the specified decimal number. For example, 32.233 will return 33.

number

The number whose ceiling is required.

Returns

The ceiling value of the given number.

Cos

Math.Cos(angle)

Gets the cosine of the given angle in radians.

angle

The angle whose cosine is needed (in radians).

Returns

The cosine of the given angle.

Floor

Math.Floor(number)

Gets an integer that is less than or equal to the specified decimal number. For example, 32.233 will return 32.

number

The number whose floor value is required.

Returns

The floor value of the given number.

GetDegrees

Math.GetDegrees(angle)

Converts a given angle in radians to degrees.

angle

The angle in radians.

Returns

The converted angle in degrees.

GetRadians

Math.GetRadians(angle)

Converts a given angle in degrees to radians.

angle

The angle in degrees.

Returns

The converted angle in radians.

GetRandomNumber

Math.GetRandomNumber(maxNumber)

Gets a random number between 1 and the specified maxNumber (inclusive).

maxNumber

The maximum number for the requested random value.

Returns

A Random number that is less than or equal to the specified max.

Log

Math.Log(number)

Gets the logarithm (base 10) value of the given number.

number

The number whose logarithm value is required

Returns

The log value of the given number

Max

Math.Max(number1, number2)

Compares two numbers and returns the greater of the two.

number1

The first of the two numbers to compare.

number2

The second of the two numbers to compare.

Returns

The greater value of the two numbers.

Min

Math.Min(number1, number2)

Compares two numbers and returns the smaller of the two.

number1

The first of the two numbers to compare.

number2

The second of the two numbers to compare.

Returns

The smaller value of the two numbers.

NaturalLog

Math.NaturalLog(number)

Gets the natural logarithm value of the given number.

number

The number whose natural logarithm value is required.

Returns

The natural log value of the given number.

Power

Math.Power(baseNumber, exponent)

Raises the baseNumber to the specified power.

baseNumber

The number to be raised to the exponent power.

exponent

The power to raise the base number.

Returns

The baseNumber raised to the specified exponent.

Remainder

Math.Remainder(dividend, divisor)

Divides the first number by the second and returns the remainder.

dividend

The number to divide.

divisor

The number that divides.

Returns

The remainder after the division.

Round

Math.Round(number)

Rounds a given number to the nearest integer. For example 32.233 will be rounded to 32.0 while 32.566 will be rounded to 33.

number

The number whose approximation is required.

Returns

The rounded value of the given number.

Sin

Math.Sin(angle)

Gets the sine of the given angle in radians.

angle

The angle whose sine is needed (in radians)

Returns

The sine of the given angle

SquareRoot

Math.SquareRoot(number)

Gets the square root of a given number.

number

The number whose square root value is needed.

Returns

The square root value of the given number.

Tan

Math.Tan(angle)

Gets the tangent of the given angle in radians.

angle

The angle whose tangent is needed (in radians).

Returns

The tangent of the given angle.
(c) Copyright 2009, Microsoft Corporation. All rights reserved.