Rail3D*

   

 

Built In Functions



On this page…

  1. 1 Debug
  2. 2 Display
  3. 3 Input
  4. 4 String
  5. 5 Trig
  6. 6 Other

1 Debug

debug.clear

Clears the debug (output) window

debug.print(expression)

Writes the output to the debug window.

debug.printL(expression)

Writes the output to the debug window with a new line.

debug.printTime();

Prints current simulation time in debug window.

2 Display

Display(str)

Displays a line of text on the main window.

Alert(str)

Posts an alert box on the main display.

Status(str)

v108

Posts string to status pane of main window

3 Input

string InputString(string prompt)
int InputInt(string prompt) 
float InputFloat(string prompt)

Displays an input dialogue with the prompt text, returns the string, int, or float supplied by the user

4 String

Str Left(str,x)

Returns left x characters of string

Str Mid(str,x)

Returns string from x onwards

Str Mid(str,x,y)

Returns middle y characters from x onwards of string

Str Right(str,x)

Returns right x characters of string

int Len(str)

Returns length of string

5 Trig

float sin(float angle)
float cos(float angle)
float tan(float angle)

Returns sine, cosine, tangent, of an angle. Angle must be in radians

float asin(float value)
float acos(float value)
float atan(float value)

Returns arcsine, arccos, or arctangent (in radians) of a value

float sqrt(float value)

Returns square root of a value

6 Other

int Rand(x)

Returns a random number from zero to x-1 (inclusive)



import