QMBasic Statements and Functions by Name

QMBasic Statements and Functions by Name

Top  Previous  Next

 

@(x,y)Terminal cursor movement and control
ABORTAbort to command prompt
ABORTEAbort to command prompt with Pick style message handling
ABORTMAbort to command prompt with Information style message handling
ABS()Absolute value
ABSS()Multivalued absolute value
ACCEPT.SOCKET.CONNECTION()Accept an incoming connection on a server socket
ACCOUNT.PATH()Return pathname for a given account
ACOS()Arc-cosine
ALPHA()Test if string holds only alphabetic characters
ANDS()Multivalued logical AND
ARG()Returns an argument variable based on its argument list position
ARG.COUNT()Returns the number of arguments passed into a subroutine
ARG.PRESENT()Test for presence of an argument in a subroutine or function
ASCII()Convert an EBCDIC string to ASCII
ASIN()Arc-sine
ASSIGNED()Test whether variable is assigned
ATAN()Arc-tangent
BEGIN TRANSACTIONStart a new transaction
BINDKEY()Set, remove, query, save or restore key bindings
BITAND()Bitwise logical AND operation
BITNOT()Bitwise logical NOT operation
BITOR()Bitwise logical OR operation
BITRESET()Turn off specified bit
BITSET()Turn on specified bit
BITTEST()Test specified bit
BITXOR()Bitwise logical exclusive OR operation
BREAKEnable or disable break key handling
BREAK.COUNT()Return the value of the break inhibit counter
CALLCall an external subroutine
CASEPerform statements according to multiple conditions
CATALOGUED()Check catalogue entry
CATS()Concatenate elements of a dynamic array
CAUGHT()Test whether a handler exists for a named exception
CHAINTerminate program and execute a command
CHANGE()Replace substring in a string
CHAR()Get ASCII character for a given collating sequence value
CHARS()Evaluates the CHAR() function for each element of a dynamic array
CHECKSUM()Calculate a checksum value for a supplied data item
CHILD()Test if a phantom process is still running
CLASSDeclare a class module
CLEARSet all local variables to zero
CLEARCOMMONSet all unnamed common variables to zero
CLEARDATAClear DATA queue
CLEARFILEClear a file, deleting all records and releasing disk space
CLEARINPUTClear keyboard type-ahead
CLEARSELECTClear one or all select lists
CLOSEClose a file
CLOSESEQClose a record opened for sequential access
CLOSE.SOCKETClose a socket
COL1()Start of substring position from FIELD()
COL2()End of substring position from FIELD()
COLLECTION()Create or copy a data collection
COMMITCommit transaction updates
COMMONDefine a common block
COMPARE()Compare strings
COMPARES()Multivalued variant of COMPARE()
CONFIG()Returns the value of a configuration parameter
CONNECT.PORT()Connect a serial port to a phantom process
CONTINUEContinue next iteration of a loop
CONVERTSubstitute characters with replacements
CONVERT()Substitute characters with replacements
COS()Cosine
COUNT()Count occurrences of substring in string
COUNTS()Multivalued variant of COUNT()
CREATECreate an empty sequential file record
CREATE.FILECreate a file
CREATE.SERVER.SOCKET()Open a server socket
CROP()Remove redundant mark characters
CRTSynonym for DISPLAY
CSVDQ()De-quote a CSV string
CSV.MODESet CSV conversion mode
DATASave text in DATA queue
DATE()Return the current date as a day number
DCOUNT()Count delimited substrings in string
DEBUGEnter debugger
DECRYPT()Decrypt text
DEFFUNDefine a function
DELDelete a field, value or subvalue
DELETEDelete record from a file
DELETE()Delete a field, value or subvalue
DELETELISTDelete a saved select list
DELETESEQDelete an operating system file
DELETEUDelete record from a file preserving locks
DFPART()Access a part file within a distributed file
DIMSynonym for DIMENSION
DIMENSIONSet matrix dimensions
DISINHERITDisinherit an object
DISPLAYOutput to the display
DISPLAY.WIDTH()Return the number of character positions required to display a string
DISPLAY.WIDTHS()Evaluates the DISPLAY.WIDTH() function for each element of a dynamic array
DIR()Return the contents of a directory
DISABLE.KEYDeny access to a password protected encryption key
DIV()Divide
DOWNCASE()Convert string to lowercase
DPARSESplit elements of a delimited string
DPARSE.CSVSplit elements of a CSV format delimited string
DQUOTE()Synonym for QUOTE()
DQUOTES()Synonym for QUOTES()
DTX()Convert a number to hexadecimal
EBCDIC()Convert an EBCDIC string to ASCII
ECHAR()Returns the ECS character with a given codepoint value
ECHARS()Evaluates the ECHAR() function for each element of a dynamic array
ECHOEnable or disable input echo
ELEMENT.EXISTS()Test for presence of a data collection element
ENABLE.KEYEnable access to a password protected encryption key
ENCRYPT()Encrypt data
ENDTerminate program or statement group
END TRANSACTIONTerminate a transaction
ENTERSynonym for CALL
ENTER.PACKAGE()Enter a licensed package
ENUMERATE()Build a dynamic array of element names in a data collection
ENV()Retrieve an operating system environment variable
EPOCH()Return time and date as an epoch value
EQS()Multivalued equality test
EQUATEDefine a symbolic name for a constant or matrix element
EREPLACE()Replace substring in a string
ERRMSGDisplay a Pick style message from the ERRMSG file
EVALUATEEvaluate an I-type expression, trapping errors
EXECUTEExecute a command
EXITLeave a loop
EXIT.PACKAGE()Exit from a licensed package
EXP()Exponential
EXPAND()Expand a linked data collection
EXTRACT()Extract a field, value or subvalue
FCONTROL()Perform control action on an open file
FIELD()Extract delimited fields
FIELDS()Multivalued variant of FIELD()
FIELDSTORE()Replace or insert delimited fields
FILEOpen a file and access data by field name
FILE.EVENT()Create a file event monitoring variable
FILEINFO()Return information about an open file
FILELOCKLock a file
FILEUNLOCKUnlock a file
FINDFind a string in a dynamic array element
FINDSTRFind a substring in a dynamic array element
FIX()Convert a floating point value to a string with a specified precision
FLUSHFlush sequential file data to disk
FLUSH.DH.CACHEFlush dynamic file cache
FMT()Format a string
FMTDW()Format a string based on display width
FMTDWS()Format a dynamic array based on display width
FMTS()Format a dynamic array
FOLD()Break a string into sections, splitting at spaces where possible
FOLDDW()Break a string into sections based on display width, splitting at spaces where possible
FOLDS()Multivalued variant of FOLD()
FOLDDWS()Multivalued variant of FOLDDW()
FOOTINGSet footing text
FOR / NEXTIterative loop construct
FORMCSV()Transforms a string to a CSV standard compliant item
FORMLISTCreate a numbered select list from a dynamic array
FORMLISTVCreate a select list variable from a dynamic array
FUNCTIONDeclare function name and arguments
GES()Multivalued greater than or equal to test
GETSynonym for PUBLIC FUNCTION
GET(ARG.)Retrieve command line arguments
GET.MESSAGES()Retrieve messages from the message queue
GET.PORT.PARAMS()Get serial port parameters
GETLISTRestore a saved select list to a numbered list
GETLISTVRestore a saved select list to a select list variable
GETLOCKSReturns information about file and record locks
GETNLS()Get national language support parameter value
GETPU()Get a characteristic of a print unit
GETREM()Get remove pointer position
GO / GOTOJump to a label
GOSUBEnter an internal subroutine
GTS()Multivalued greater than test
HEADINGSet heading text
HUSHSuppress or enable display output
ICONV()Perform input conversion
ICONVS()Perform input conversion on a dynamic array
IDIV()Integer division
IF / THEN / ELSEPerform conditional statements
IFS()Multivalued conditional expression
INRead a single byte from the terminal with an optional timeout
INDEX()Locate occurrence of substring within a string
INDEXS()Multivalued equivalent of INDEX()
INDICES()Return information about alternate key indices
INHERITInherit an object
INMAT()Return status of matrix operations
INPUTInput a string from the keyboard or data queue
INPUT @Input a string from the keyboard or data queue
INPUTCLEARSynonym for CLEARINPUT
INPUTCSVInput CSV format data
INPUTERRSynonym for PRINTERR
INPUTFIELDInput a string with function key handling
INPUTFIELDVInput a string with function key handling
INPUTNULLSet a special character to return a null string in INPUT @ and INPUTFIELD
INPUTTRAPDefines characters with special actions in INPUT @ and INPUTFIELD
INSInsert a field, value or subvalue
INSERT()Insert a field, value or subvalue
INT()Truncate value to integer
IS.ALNUM()Test whether a character is alphanumeric
IS.ALPHA()Test whether a character is a letter
IS.DIGIT()Test whether a character is a digit
IS.ECS()Test whether a character string contains ECS characters
IS.GRAPH()Test whether a character is a graphic
IS.MARK()Test whether a character is a mark
IS.SPACE()Test whether a character is a space
IS.USER.CHAR()Test whether a character has the user definable attribute set
IS.WIDESTR()Determine whether a string contains any wide characters
ITYPE()Execute a compiled I-type
JBUILD()Build a JSON string from a data collection
JPARSE()Parse a JSON string into a data collection
KEEP.SELECTIndicate that the default select list should not be cleared on return to the command processor
KEYCODE()Input a single keystroke from the keyboard with terminfo translation
KEYCODEV()Input a single keystroke from the keyboard with terminfo translation to a code point value
KEYEDITDefine editing keys for INPUT @
KEYEXITDefine exit keys for INPUT @
KEYIN()Input a single keystroke from the keyboard, returning the character
KEYINC()Input a single keystroke from the keyboard with case inversion
KEYINCV()Input a single keystroke from the keyboard with case inversion, returning a code point value
KEYINR()Input a single keystroke from the keyboard in raw mode (no internal processing)
KEYINV()Input a single keystroke from the keyboard, returning a code point value
KEYREADY()Test for keyboard input
KEYTRAPDefine trap keys for INPUT @
LAST()Extract the final substring from a delimited string
LASTS()Multivalued equivalent of LAST()
LEFT()Return leading substring
LEN()Return length of a string
LENS()Multivalued equivalent of LEN()
LES()Multivalued less than test
LISTINDEX()Return position of an item in a delimited list
LN()Natural log
LOCALDeclares an internal subroutine or function that has private local variables
LOCATELocate string in dynamic array
LOCATE()Locate string in dynamic array
LOCKSet task lock
LOGMSGAdd an entry to the system error log
LOOP / REPEATDefine a loop to be repeated
LOWER()Convert delimiters to lower level
LTS()Multivalued less than or equal to test
MARK.MAPPINGControl field mark translation in directory files
MATMatrix initialisation or copy
MAT()Create or copy a data collection array
MATBUILDBuild a dynamic array from matrix elements
MATCHESS()Matches each element of a dynamic array against a pattern template
MATCHFIELD()Return portion of string matching pattern
MATCHFIELDS()Return portion of string matching pattern for each element of a dynamic array
MATPARSEBreak a dynamic array into matrix elements
MATREADRead a record, parsing into a matrix
MATREADCSVRead a CSV format text item into a matrix
MATREADLRead a record setting a read lock, parsing into a matrix
MATREADURead a record setting an update lock, parsing into a matrix
MATSTR()Convert a dimensioned matrix to a dynamic array
MATWRITEWrite a record from matrix elements
MATWRITECSVWrite CSV form data from matrix elements to a sequential file
MATWRITEUWrite a record from matrix elements, retaining any lock
MAX()Returns the greater of two values
MAXIMUM()Find the greatest value in a dynamic array
MD5()Convert a string to its 32 digit message digest value
MERGELIST()Combine two field mark delimited sorted lists
MIN()Returns the lesser of two values
MINIMUM()Find the lowest value in a dynamic array
MOD()Modulus value from division
MODS()Multivalued modulus value from division
MOUSEEnable or disable mouse input
MVDATE()Extract the multivalue style date from an epoch value
MVDATE.TIME()Extract the multivalue style date and time from an epoch value
MVEPOCH()Convert a multivalue style date and time to an epoch value
MVTIME()Extract the multivalue style time from an epoch value
NAPSuspend program for a short period
NEG()Arithmetic inverse
NEGS()Multivalued arithmetic inverse
NES()Multivalued inequality test
NOBUFTurn off buffering for a record opened using OPENSEQ
NOT()Logical NOT
NOTS()Multivalued logical NOT
NS()Return a dynamic array of subvalue positions for supplied data
NULLNo operation
NUM()Test if string holds a numeric value
NUMS()Multivalued variant of NUM()
NV()Return a dynamic array of value positions for supplied data
OBJECT()Instantiates an object
OBJINFO()Returns information about an object variable
OCONV()Perform output conversion
OCONVS()Perform output conversion on a dynamic array
ON GOSUBJump to one of a list of labels selected by value
ON GOTOEnter one of a list of internal subroutines selected by value
OPENOpen a file
OPENPATHOpen a file by pathname
OPENSEQOpen a record for sequential access
OPENTEMPCreate and open a temporary file
OPEN.SOCKET()Open a socket connection
OPTION()Return setting of an option switch
ORS()Multivalued logical OR
OS.ERROR()Return operating system error information
OS.EXECUTEExecute an operating system command
OSDELETEDelete a file by pathname
OSPATH()Perform action on operating system file
OSREADRead a file by pathname
OSRENAME()Rename an operating system file or directory
OSWRITEWrite a file by pathname
OUTERJOIN()Fetch data from a file using an "outer join"
PAGEStart a new page
PARSE()Parse a string against a pattern template
PAUSEPause execution until awoken by another process
PDUMPGenerate a process dump file
PERFORMSynonym for EXECUTE
PHANTOMStart a phantom process
POOL.IDLEMove a connection pooling phantom process into the idle state
PRECISIONSet number of decimal places in numeric conversion
PRINTOutput to a logical print unit
PRINTCSVPrint data in comma separated variable format
PRINTER CLOSEClose a print unit
PRINTER DISPLAYAssociate a print unit with the display
PRINTER FILEAssociate a file with a print unit
PRINTER NAMEAssociate a print device with a print unit
PRINTER OFFDisable print unit zero
PRINTER ONEnable print unit zero
PRINTER RESETReset default print unit and display
PRINTER SETTINGSet a print unit parameter
PRINTER.SETTING()Set or retrieve a print unit parameter
PRINTERRDisplay an error message
PRIVATEDeclare private variables in a local subroutine or a class modules
PROCREADRead data from the PROC primary input buffer
PROCWRITEWrite data to the PROC primary input buffer
PROGRAMDeclare program name
PROMPTSet the input prompt character
PTERM()Set/clear/query terminal settings
PUBLICDeclare public properties in a class module
PUTSynonym for PUBLIC SUBROUTINE
PWR()Raise value to power
QUOTE()Enclose a string in quotes
QUOTES()Enclose each element of a dynamic array in double quotes
RAISE()Convert delimiters to higher level
RANDOMIZESet random number seed value
RDIV()Rounded integer division
READRead a record from a file
READ.SOCKET()Read data from a socket
READBLKRead bytes from a sequential file
READCSVRead a CSV format text item
READLRead a record from a file, setting a read lock
READLISTSave a select list in a dynamic array
READNEXTRead a record id from a select list
READSEQRead from a sequential file
READURead a record from a file, setting an update lock
READVRead a field from a record in a file
READVLRead a field from a record in a file, setting a read lock
READVURead a field from a record in a file, setting an update lock
RECORDLOCKED()Test if record is locked
RECORDLOCKLSet a read lock on a record
RECORDLOCKUSet an update lock on a record
REDIMRe-dimension a matrix passed as an argument
REDIMENSIONRe-dimension a matrix passed as an argument
REGEX()Test a string against a regular expression
RELEASERelease record or file locks
REM()Remainder value from division
REMARKAlternative syntax for comments
REMOVEExtract an item from a dynamic array
REMOVE()Extrac an item from a dynamic array
REMOVEF()Extract data from a delimited character string
REMOVE.BREAK.HANDLERDeactivate a break handler subroutine
REPLACE()Replace a field, value or subvalue
RESTORE.SCREENRestore screen image data
RETURNReturn from CALL or GOSUB
RETURN FROM PROGRAMReturn from CALL
RETURN TOReturn from program or subroutine to a specific label
REUSE()Reuse element of numeric arrays in mathematical functions
RIGHT()Return trailing substring
RMVD()Extract an item from a dynamic array
RND()Generate random number
ROUNDDOWN()Round a number towards zero in a specified increment
ROUNDUP()Round a number away from zero in a specified increment
ROLLBACKDiscard transaction updates
RQMSynonym for SLEEP
RTRANS()Fetch data from a file
SADD()Perform integer addition of two numeric strings of any length
SAVE.SCREEN()Save screen image data
SAVELISTSave a select list in the $SAVEDLISTS file
SCMP()Compare two integer numeric strings of any length
SDIV()Perform integer division of two numeric strings of any length
SEEKPosition a sequential file
SELECTBuild a select list of all records in an open file
SELECT.SOCKET()Monitor events on multiple sockets
SELECTETransfer select list 0 to a select list variable
SELECTINDEXBuild a numbered select list from an alternate key index
SELECTINDEXVBuild a select list variable from an alternate key index
SELECTINFO()Return information regarding a select list
SELECTLEFTScan left through an alternate key index, creating a numbered select list
SELECTLEFTVScan left through an alternate key index, creating a select list variable
SELECTNBuild a numbered select list of all records in an open file
SELECTRIGHTScan right through an alternate key index, creating a numbered select list
SELECTRIGHTVScan right through an alternate key index, creating a select list variable
SELECTVBuild a select list variable of all records in an open file
SENTENCE()Returns the command line that started the current program
SEQ()Get collating sequence value for a given ASCII character
SEQS()Evaluates the SEQ() function for each element of a dynamic array
SERVER.ADDR()Find the IP address for a given server name
SERVER.WINDOW()Open an asynchronous server application window
SET.ARGSets an argument variable based on its argument list position
SET.BREAK.HANDLEREstablish a break handler subroutine
SET.ECS.MAP()Select an ECS character map
SET.EXIT.STATUSSet final exit status value
SET.PORT.PARAMS()Set serial port parameters
SET.SOCKET.MODE()Set mode of a socket
SET.STATUSSet the STATUS() value
SET.TIMEZONESet time zone for use by the epoch conversion code
SETLEFTSet alternate key index scan position to leftmost
SETNLS()Set national language support parameter value
SETPUSet a characteristic of a print unit
SETRIGHTSet alternate key index scan position to rightmost
SETREMSet remove pointer position
SHAREDDefine shared variables in a class module
SHIFT()Perform bit shift
SIGNAL()Raise a cross-process application signal
SIN()Sine                
SLEEPSuspend program to / for given time
SMUL()Perform integer multiplication of two numeric strings of any length
SOCKET.INFO()Retrieve information about a socket
SORT()Initialise a sort session
SORTADDAdd an item to a sort session
SORTCLEARTerminate a sort session
SORTDATA()Retrieve sorted data from a sort session
SORTNEXT()Return next item from a sort session
SORT.COMPARE()Compare items according to sort rules
SOUNDEX()Form a Soundex code value for a string
SOUNDEXS()Multivalued variant of SOUNDEX()
SPACE()Create a string of spaces
SPACES()Multivalued variant of SPACE()
SPLICE()Concatenates elements of two dynamic arrays, inserting a string between the items.
SQRT()Square root
SQUOTE()Enclose a string in single quotes
SQUOTES()Enclose each element of a dynamic array in single quotes
SSELECTBuild a sorted select list of all records in an open file
SSUB()Perform integer subtraction of two numeric strings of any length
STATUS()Return status from previous operation
STATUSReturns a dynamic array of information about an open file
STOPTerminate program
STOPETerminate program with Pick style message handling
STOPMTerminate program with Information style message handling
STR()Create a string from a repeated substring
STRS()Multivalued variant of STR()
SUBR()Call a subroutine as a function
SUBROUTINEDeclare subroutine name and arguments
SUBSTITUTE()Multivalued substring replacement
SUBSTRDW()Extract a substring based on its display width
SUBSTRDWS()Multivalued equivalent of SUBSTRDW()
SUBSTRINGS()Multivalued substring extraction
SUM()Sum lowest level elements of a numeric array
SUMMATION()Sum all elements of a numeric array
SWAP()Synonym for CHANGE()
SWAPCASE()Invert case of alphabetic characters in a string
SWAPMARKS()Exchange mark characters with displaced Unicode accented characters
SYSMSG()Retrieve a message from the MESSAGES library
SYSTEM()Return system information
TAN()Tangent
TCLREADReturns the sentence that started the current program
TERMINFO()Retrieve information from the terminfo database
TERMINFO.EX()Retrieve extended information from the terminfo database
TESTLOCK()Test state of a task lock
THROWThrow an exception
TIME()Return the current time
TIMEDATE()Return the date and time as a string
TIMEOUTSets a timeout for READBLK and READSEQ
TRANS()Fetch data from a file
TRANSACTION ABORTAbort a transaction
TRANSACTION COMMITCommit a transaction
TRANSACTION STARTStart a new transaction
TRANSLITERATE()Replace characters by 8 bit transliteration substitutes
TRIM()Trim characters from string
TRIMB()Trim spaces from back of string
TRIMBS()Multivalued variant of TRIMB()
TRIMF()Trim spaces from front of string
TRIMFS()Multivalued variant of TRIMF()
TRIMS()Multivalued variant of TRIM()
TRIMW()Trim whitespace characters from string
TRIMWS()Multivalued variant of TRIMW()
TRY/CATCHExecute statements with an exception handler
TTYGET()Get current terminal mode settings
TTYSETSet terminal modes
UNASSIGNED()Test whether variable is unassigned
UNLOCKRelease task lock
UNTILLeave loop if condition is met
UPCASE()Convert string to uppercase
VARTYPE()Determine data type of a variable
VOCPATH()Resolve a filename to its corresponding pathname
VOIDDiscard the result of evaluating an expression
VSLICE()Extract a value or subvalue slice from a dynamic array
WAIT.FILE.EVENT()Wait for a file monitoring event to occur
WAKERestart execution of a process on a PAUSE
WEOFSEQWrite end of file position to sequential file
WHILELeave loop unless condition is met
WRITEWrite a record to a file
WRITE.SOCKET()Write data to a socket
WRITEBLKWrite bytes to a sequential file
WRITECSVWrite CSV format data to a sequential file
WRITELISTCreate a saved select list from a dynamic array
WRITESEQWrite to sequential file
WRITESEQFWrite to sequential file, flushing to disk
WRITEUWrite a record to a file, retaining any lock
WRITEVWrite a field to a record in a file
WRITEVUWrite a field to a record in a file, retaining any lock
XLATE()Synonym for TRANS()
XTD()Convert a hexadecimal number