Command Reference for Liberty BASIC v1.4
Command or Function Description
--------------------- -----------------------------------------------
ABS( n ) absolute value
ACS( n ) arc-cosine of n
a AND b performs boolean and bitwise AND
ASC( s$ ) ascii value of s$
ASN( n ) arc-sine of n
ATN( n ) arc-tangent of n
BEEP ring bell
BMPBUTTON add a bitmap button to a window
BMPSAVE save a bitmap from memory to a file
BUTTON add a button to a window
CALLDLL call an API or DLL function
CHECKBOX add a checkbox to a window
CHR$( n ) return character of ascii value n
CLOSE #h close a file or window with handle #h
CLS clear a program's mainwindow
CommandLine$ contains any command line switches used on startup
COMBOBOX adds a combobox to a window
CONFIRM opens a confirm dialog box
COS( n ) cosine of n
CURSOR changes the mouse cursor
DATE$( ) returns string with today's date
DefaultDir$ a variable containing the default directory
DIM array( ) dimension array( )
Drive$ special variable, holds drive letters
DUMP force the LPRINT buffer to print
EOF( #h ) end-of-file status for #h
END marks end of program execution
EXP( n ) returns e^n logarithm
FIELD #h, list... sets random access fields for #h
FILEDIALOG opens a file selection dialog box
FILES returns file and subdirectory info
FOR...NEXT performs looping action
GET #h, n get random access record n for #h
GETTRIM #h, n get r/a record n for #h, blanks trimmed
GOSUB label call subroutine label
GOTO label branch to label
GRAPHICBOX adds a graphics region to a window
GROUPBOX adds a groupbox to a window
HEXDEC("value") convert a hexadecimal string to a decimal number
HWND( #handle) return a Windows handle for a window
IF...THEN perform conditional action(s)
IF THEN ELSE perform conditional action(s)
INPUT get data from keyboard, file or button
INPUT$( #h, n ) get n chars from handle #h
INSTR(a$,b$,n) search for b$ in a$, with optional start n
INT( n ) integer portion of n
KILL s$ delete file named s$
LEFT$( s$, n ) first n characters of s$
LEN( s$ ) length of s$
LET var = expr assign value of expr to var
LINE INPUT get next line of text from file
LISTBOX adds a listbox to a window
LOADBMP load a bitmap into memory
LOF( #h ) return length of open file #h
LOG( n ) natural log of n
LOWER$( s$ ) s$ converted to all lowercase
LPRINT print to hard copy
MENU adds a pull-down menu to a window
MID$( ) return a substring from a string
MKDIR( ) make a new subdirectory
NAME a$ AS b$ rename file named a$ to b$
NOMAINWIN keep a program's main window from opening
NOTICE open a notice dialog box
OPEN open a file, window, or DLL
OPEN "COMn:..." open a communications port for readin/writing
a OR b performs boolean and bitwise OR
OUT port, byte send a byte to a port
Platform$ special variable containing platform name
PLAYWAVE plays a *.wav sound file
PRINT print to a file or window
PROMPT open a prompter dialog box
PUT #h, n puts a random access record n for #h
RADIOBUTTON adds a radiobutton to a window
REDIM redimensions an array and resets it contents
REM adds a remark to a program
RETURN return from a subroutine call
RIGHT$( s$, n ) n rightmost characters of s$
RMDIR( ) remove a subdirectory
RND( n ) return pseudo-random seed
RUN s$, mode run external program s$, with optional mode
SCAN checks for and dispatches user actions
SIN( n ) sine of n
SORT sorts single and double dim'd arrays
SPACE$( n ) returns a string of n spaces
STR$( n ) returns string equivalent of n
STRUCT builds a structure used in calling of APIs and DLL functions
TAN( n ) tangent of n
TIME$( ) returns current time as string
TRACE n sets debug trace level to n
TRIM$( s$ ) returns s$ without leading/trailing spaces
UPPER$( s$ ) s$ converted to all uppercase
USING( ) performs numeric formatting
UpperLeftX specifies the x position where the next window will open
UpperLeftY specifies the y position where the next window will open
VAL( s$ ) returns numeric equivalent of s$
Version$ special variable containing LB version info
WHILE...WEND performs looping action
WindowWidth specified the width of the next window to open
WindowHeight specifies the height of the next window to open
WORD$( s$, n ) returns nth word from s$
Look at Liberty BASIC Screenshots!
Order Liberty BASIC with your credit card now!
Back to Home Page