software / RapidQ / RQ Doc / html / other.html

Search 搜索
Home Home

Appendix C: Reserved Keywords
Rapid-Q Documentation by William Yu (c)1999 Appendix C: Reserved Keywords

Reserved Keywords

Most of these have the same functionality as QBasic, so you could just as easily look them up there. Again, when I refer to Unix, I mean Linux & Unix.


ABSWindows UnixABS(NumericExpression)
Return absolute value of number
ACOSWindows UnixACOS(NumericExpression)
Returns arccosine of NumericExpression
ASCWindows UnixASC(Char$)
Returns the ASCII key value of Char$
ASINWindows UnixASIN(NumericExpression)
Returns arcsine of NumericExpression
ATNWindows UnixATN(NumericExpression)
Returns arctangent of NumericExpression
BIN$Windows UnixBIN$(Integer-Number)
Returns the binary representation of the Number (must be a positive integer).
BINDWindows UnixBIND Num TO MyFunc
BIND a function pointer
Returns the absolute address of the SUB/FUNCTION
CALLFUNCWindows UnixCALLFUNC(Num, Param1, Param2, ...)
Call function pointer
CEILWindows UnixCEIL(NumericExpression)
Rounds a numeric expression up towards positive infinity.
CHDIRWindows UnixCHDIR Path$
Change directory
CHR$Windows UnixCHR$(Byte)
Returns character corresponding to the ascii key value
CINTWindows UnixCINT(NumericExpression)
Implemented for compatibility reasons. Use ROUND instead.
CLNGWindows UnixCLNG(NumericExpression)
Implemented for compatibility reasons. Use ROUND instead.
CONSTWindows UnixCONST Variable = Expression
Assigns Variable a constant value
CONVBASE$Windows UnixCONVBASE$(Str$, FromBase, ToBase)
Returns the representation Str$ FromBase to ToBase representation.
COSWindows UnixCOS(NumericExpression)
Returns cosine of an angle given in radians
DATAWindows UnixDATA constant|EXECUTE(...) [, constant|EXECUTE(...), ...]
Stores data for easy retrieval, use READ to read the data.
DATE$Windows UnixDATE$
Returns the current Date in MM-DD-YYYY format.
DECWindows UnixDEC(Variable [, DecVal])
Decrements variable by 1 unless otherwise specified
DEF...Windows UnixDEF(...) Variable
See details for more information on this statement
DELETE$Windows UnixDELETE$(S$, Index, Count)
Deletes Count number of characters from S$ starting at Index
DIMWindows UnixDIM Variable AS DataType
Creates variable of type DataType
DIR$WindowsDIR$[(FileSpec$, Attributes%)]
Returns the next file of FileSpec$
Returns 0 if directory does not exist, non-zero otherwise
Polls events, useful when you're in a deep/big loop
ENDWindows UnixEND
Terminates program
EXPWindows UnixEXP(NumericExpression)
Calculates the exponential function (e raised to the power of NumericExpression)
ENVIRONWindows UnixENVIRON StringExpression
Set environment string
ENVIRON$Windows UnixENVIRON$(environment-string)
Get environment value
Extracts a resource to file
FIELD$Windows UnixFIELD$(StringExpresion, Deliminator, FieldNumber)
Returns a field/token separated by deliminators.
Returns 0 if file not found, non-zero otherwise
FIXWindows UnixFIX(NumericExpression)
Truncates fractional number, rounding down towards 0.
FLOORWindows UnixFLOOR(NumericExpression)
Rounds a numeric expression down towards negative infinity.
FORMAT$Windows UnixFORMAT$(S$, arg1, arg2, ...)
Returns a formatted string assembled from a format string and a series of arguments (up to 50)
FRACWindows UnixFRAC(NumericExpression)
Returns the fractional part of the numeric expression.
HEX$Windows UnixHEX$(NumericExpression)
Returns the HEXidecimal string representation of the NumericExpression
INCWindows UnixINC(Variable [, IncVal])
Increments variable by 1 unless otherwise specified
INITARRAYWindows UnixINITARRAY(Array, values, ...)
Initializes array with corresponding values
INPWindows UnixINP(Address)
Returns the byte value read from an I/O port 0..65535
INPWWindows UnixINPW(Address)
Returns the word value read from an I/O port 0..65535
INSERT$Windows UnixINSERT$(Source$, S$, Index)
Insert Source$ string to string S$ at Index
INSTRWindows UnixINSTR([Start,] SearchString, FindString)
Function returns the position in the SearchString that FindString was found, 0 otherwise
INTWindows UnixINT(NumericExpression)
Convert NumericExpression to a 32-bit INTEGER, truncating decimals.
KILLWindows UnixKILL Filename$
Deletes file
Removes message from queue
LBOUNDWindows UnixLBOUND(ArrayName[, Dimension])
Returns the lowerbound of an array (Dimension starts at 1)
LCASE$Windows UnixLCASE$(StringExpression)
StringExpression is lowercased
LEFT$Windows UnixLEFT$(StringExpression, N)
Returns the leftmost N characters of a string
LENWindows UnixLEN(StringExpression)
Returns the length of string
Calling this will start printing your document. Make sure all your LPRINTs are executed before calling LFLUSH.
Returns the handle to a loaded DLL module
LOGWindows UnixLOG(NumericExpression)
Returns the natural logarithm of NumericExpression
LPRINTWindowsLPRINT [Expression][;|,][...]
LPRINT acts exactly like PRINT, except all output is directed to the default printer. Make sure to call LFLUSH. Also see the Printer component for graphical printing.
LTRIM$Windows UnixLTRIM$(StringExpression)
Returns string with left padded spaces removed
MEMCMPWindows UnixMEMCMP(ptr1, ptr2, count)
Compares 2 memory addresses, returns 0 if not equal, non-zero otherwise.
MEMCPYWindows UnixMEMCPY(destination, source, count)
Copies count bytes of source memory address to destination memory address.
MEMSETWindows UnixMEMSET(source, char, n)
Initializes a source memory block with n bytes of char.
MESSAGEBOXWindowsMESSAGEBOX(Msg$, Title$, MsgButtons%)
Displays a simple message box with prompts
MESSAGEDLGWindowsMESSAGEDLG(Msg$, MsgType, MsgButtons, HelpContext)
Displays a message dialog box, see RAPIDQ.INC for proper types & buttons
MID$Windows UnixMID$(StringExpression, I, N)
Returns string with characters from I to N of StringExpression
MKDIRWindows UnixMKDIR Dir$
Creates new directory
OUTWindows UnixOUT(Address, bytevalue)
Sends a byte value to a machine I/O port 0..65535
OUTWWindows UnixOUTW(Address, wordvalue)
Sends a word value to a machine I/O port 0..65535
PLAYWAVWindowsPLAYWAV FileName$|Resource_Handle, SndOption
Plays a WAV file, see RAPIDQ.INC for sndOptions
POSTMESSAGEWindowsPOSTMESSAGE(Handle, uMsg, wParam, lParam)
Post message to handle, and does not block. Refer to your favourite WinAPI guide for the proper message numbers
Sort any array, BYTE, WORD, SHORT, STRING, etc...
Use randomize to reseed the random number generator
READWindows UnixREAD variable [, variable, ...]
Reads next DATA statement, stores it in variable.
REDIMWindows UnixREDIM Array(1000) AS INTEGER
Use REDIM to redimension an array preserving existing data. REDIM is equivalent to DIM if the array has not yet been allocated.
RENAMEWindows UnixRENAME File1$, File2$
Renames File1$ to File2$
REPLACE$Windows UnixREPLACE$(S$, R$, Index)
Replaces a string from S$ with R$ starting at Index
REPLACESUBSTR$Windows UnixREPLACESUBSTR$(Source$, ReplaceStr$, Withstr$)
Replaces the string ReplaceStr$ in Source$ with WithStr$
RESTOREWindows UnixRESTORE [linelabel]
Jumps to specific position in DATA statement.
RESOURCEWindows UnixRESOURCE(number%)
Get numeric value of Resource, mainly for use with ExtractResource, 0 based array.
Get resource count.
Reverses a string
RGBWindows UnixRGB(Red%, Green%, Blue%)
Returns the BGR numeric representation of the color.
RIGHT$Windows UnixRIGHT$(StringExpression, N)
Returns the righttmost N characters of a string
RINSTRWindows UnixRINSTR([Start,] SearchString, FindString)
Reverse INSTR Function, searching starts from the end of SearchString
RMDIRWindows UnixRMDIR Dir$
Removes directory
RNDWindows UnixRND(UpperBound)
Returns a random number, if no upperbound is given, it returns a decimal number. Use RANDOMIZE to reseed.
ROUNDWindows UnixROUND(NumericExpression)
Rounds number to nearest integer.
RTRIM$Windows UnixRTRIM$(StringExpression)
Returns string with rightmost padded spaces removed
RUNWindows UnixRUN command$
Executes command, but does not block
SENDMESSAGEWindowsSENDMESSAGE(Handle, uMsg, wParam, lParam)
Post message to handle, and blocks. Refer to your favourite WinAPI guide for the proper message numbers
SGNWindows UnixSGN(NumericExpression)
Returns the sign of a numeric expression
SHELLWindows UnixSHELL command$
Executes command, and blocks until finished
Popups message in a simple box
SINWindows UnixSIN(NumericExpression)
Returns sine of an angle given in radians
SOUNDWindowsSOUND freq, duration
Outputs sound through PC Speaker
SPACE$Windows UnixSPACE$(Num)
Returns string with Num spaces
SQRWindows UnixSQR(NumericExpression)
Returns the square root of NumericExpression, make sure it's non-negative
STATICWindows UnixSTATIC Variable AS DataType
Creates variable of type DataType and preserves variable between procedure calls
STR$Windows UnixSTR$(NumericExpression)
Returns the string representation of the numeric expression
STRF$WindowsSTRF$(NumericExpression, Format%, Precision%, Digits%)
Converts a floating point or number value to a string
STRING$Windows UnixSTRING$(m, n) or STRING$(m, StringExpression)
Returns a string m characters wide that only contains CHR$(n) character
SWAPWindows UnixSWAP A, B
Exchanges values, so A = B and B = A
TALLYWindows UnixTALLY(SearchString, MatchString)
Returns the number of occurrences of matchstring
TANWindows UnixTAN(NumericExpression)
Returns tangent of an angle given in radians
TIME$Windows UnixTIME$
Returns the current time in HH:MM:SS format.
TIMERWindows UnixT! = TIMER
Returns the current TIMER value
UBOUNDWindows UnixUBOUND(ArrayName[, Dimension])
Returns the upperbound of array (Dimension starts at 1)
UCASE$Windows UnixUCASE$(StringExpression)
Returns a string whose characters have been uppercased
Removes DLL from memory
VALWindows UnixVAL(StringExpression)
Returns the closest numeric representation of the string expression
VARPTRWindows UnixVARPTR(variablename)
Returns the address of a variable.
VARPTR$Windows UnixVARPTR$(address)
Returns the null-terminated string representation of a given address.
VARTYPEWindows UnixVARTYPE(variant)
Returns the type of a variant 0 - Integer, 1 - Float, 2 - String.

Prev Chapter Contents Next Chapter
© Fri 2024-6-14  Guidance Laboratory Inc. Hits:0 Last modified:2015-12-25 19:42:27