TIPC-Basic
Version: 1.0
Command List
Commands marked with an “*” are commands that are native to FreeBASIC. They are added to the list because they could be very useful to the user.
New Commands
These are new commands that where not in TI-Basic.
BigScreen |
Sets the screen size to 640x480. |
Cursor(Y,X) |
Places the cursor at the Yth row and Xth column. |
CursorX |
Returns the column number of the cursor. |
CursorY |
Returns the row number of the cursor. |
GetMouse(x,y)* |
Will store the position of the mouse (in pixels) in the defined variables (here x and y). |
GraphScreen |
Changes the screen size to 96x64, like on the TI-84+ calculator. |
HomeScreen |
Changes the screen size to 16x8 characters, like on the TI-84+ calculator. |
inStringRev (main string, substring, place) |
Searches for a substring in a main string starting backwards from the place you specified. Returns the place of last occurrence Bonus: Also enables you to do the same thing for a number. |
NormalScreen |
Sets the screen size to 320x200. This is the default size when using TIPC-Basic. |
Str(value)* |
Converts a number to a string. |
Val(string)* |
Converts a string to a number. |
Renamed commands
These are commands that couldn't be renamed to their TI-Basic counterparts because FreeBASIC already has commands with those respective names. It is best to memorize them, as there are only five . Note that technically all the pxl-commands are renamed too since they all have their hyphen “-” removed.
CircleTI(x,y,radius) |
Draws a circle at the x and y pixel locations with a given radius. Note that this is different from the way where TI-Basic draws circles. |
GetKeyTI( SC_Key) |
Returns -1 if a certain key is pressed, 0 otherwise. Check this page for the keyboard scan codes: |
LineTI(x1,y1,x2,y2) |
Draws a line from pixel locations x1,y1 to x2,y2. Note that is different from the way where TI-Basic draws lines. |
OutputTI(Y,X,text) |
Will output text (or a number) on the Yth row and Xth column. |
SubTI(string, start, length) |
Takes a piece from a string from a starting place till a given length. Bonus: Also enables you to do the same thing for a number. |
Supported commands
These are commands that are extremely similar to the ones used in TI-Basic.
abs(number)* |
Returns the absolute value of a number. |
checkTmr(variable) |
Checks the time that has passed. Used in conjunction with StartTmr. |
ClrDraw |
Exactly the same command as ClrHome. (added for completion purposes) |
ClrHome |
Clears the screen. |
Disp text |
Displays text(or a number) on the place of the cursor. |
fPart(number) |
Returns the decimal part of a number. |
inString (main string, substring, place) |
Searches for a substring in a main string starting from the place you specified. Returns the place of first occurrence Bonus: Also enables you to do the same thing for a number. |
int(number)* |
Returns the floor of a number. |
length(string) |
Returns the length of a string. Bonus: Also enables you to do the same thing for a number. |
Pause |
Pauses the program till a key is pressed. |
Pause T |
Pauses the program for T milliseconds. |
Prompt variable |
Prompts for something to store in a variable. |
PxlChange(x,y) |
Changes a black pixel into a white one and vice versa. |
PxlOff(x,y) |
Clears a pixel at pixel location x,y. |
PxlOn(x,y) |
Draws a white pixel at pixel location x,y. |
PxlTest(x,y) |
Returns 1 if the pixel at pixel location x,y is white, otherwise returns 0. |
rand |
Generates a random number between 0 and 1. |
randInt(min,max) |
Generates an integer from a minimum number to a maximum number. |
StartTmr |
Starts the timer. You need to store StartTmr in a variable. Used in conjunction with CheckTmr(. |
Stop* |
Halts program execution. After a key press it ends the program. |
Text(y,x, text) |
Displays text(or a number) on pixel coordinates y,x. |
All commands
Recap of all commands.
abs(number)* |
Returns the absolute value of a number. |
BigScreen |
Sets the screen size to 640x480. |
checkTmr(variable) |
Checks the time that has passed. Used in conjunction with StartTmr. |
CircleTI(x,y,radius) |
Draws a circle at the x and y pixel locations with a given radius. Note that this is different from the way where TI-Basic draws circles. |
ClrDraw |
Exactly the same command as ClrHome. (added for completion purposes) |
ClrHome |
Clears the screen. |
Cursor(Y,X) |
Places the cursor at the Yth row and Xth column. |
CursorX |
Returns the column number of the cursor. |
CursorY |
Returns the row number of the cursor. |
Disp text |
Displays text(or a number) on the place of the cursor. |
fPart(number) |
Returns the decimal part of a number. |
GetKeyTI( SC_Key) |
Returns -1 if a certain key is pressed, 0 otherwise. Check this page for the keyboard scan codes: |
GetMouse(x,y)* |
Will store the position of the mouse (in pixels) in the defined variables (here x and y). |
GraphScreen |
Changes the screen size to 96x64, like on the TI-84+ calculator. |
HomeScreen |
Changes the screen size to 16x8 characters, like on the TI-84+ calculator. |
inString (main string, substring, place) |
Searches for a substring in a main string starting from the place you specified. Returns the place of first occurrence Bonus: Also enables you to do the same thing for a number. |
inStringRev (main string, substring, place) |
Searches for a substring in a main string starting backwards from the place you specified. Returns the place of last occurrence Bonus: Also enables you to do the same thing for a number. |
int(number)* |
Returns the floor of a number. |
length(string) |
Returns the length of a string. Bonus: Also enables you to do the same thing for a number. |
LineTI(x1,y1,x2,y2) |
Draws a line from pixel locations x1,y1 to x2,y2. Note that is different from the way where TI-Basic draws lines. |
NormalScreen |
Sets the screen size to 320x200. This is the default size when using TIPC-Basic. |
OutputTI(Y,X,text) |
Will output text (or a number) on the Yth row and Xth column. |
Pause |
Pauses the program till a key is pressed. |
Pause T |
Pauses the program for T milliseconds. |
Prompt variable |
Prompts for something to store in a variable. |
PxlChange(x,y) |
Changes a black pixel into a white one and vice versa. |
PxlOff(x,y) |
Clears a pixel at pixel location x,y. |
PxlOn(x,y) |
Draws a white pixel at pixel location x,y. |
PxlTest(x,y) |
Returns 1 if the pixel at pixel location x,y is white, otherwise returns 0. |
rand |
Generates a random number between 0 and 1. |
randInt(min,max) |
Generates an integer from a minimum number to a maximum number. |
StartTmr |
Starts the timer. You need to store StartTmr in a variable. Used in conjunction with CheckTmr(. |
Stop* |
Halts program execution. After a key press it ends the program. |
Str(value)* |
Converts a number to a string. |
SubTI(string, start, length) |
Takes a piece from a string from a starting place till a given length. Bonus: Also enables you to do the same thing for a number. |
Text(y,x, text) |
Displays text(or a number) on pixel coordinates y,x. |
Val(string)* |
Converts a string to a number. |