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


   

Ключевые слова

Большинство ключевых слов имеют тот же смысл, что и в QBasic. Когда говорится о Unix, то имеется в виду Linux тоже.


Keyword Поддержка Использование/Описание
ABS Windows, Unix ABS(NumericExpression) Возвращает абсолютное значение ACOS Windows, Unix ACOS(NumericExpression) Возвращает арккосинус ASC Windows Unix ASC(Char$) Возвращает ASCII код символа ASIN Windows Unix ASIN(NumericExpression) Возвращает арксинус ATN Windows Unix ATN(NumericExpression) Возвращает арктангенс BIN$ Windows Unix BIN$(Integer-Number) Возвращает двоичное представление числа (число должно тбыть положительно). BIND Windows Unix BIND Num TO MyFunc Присваивает указатель на функцию CALLBACK/CODEPTR Windows CODEPTR(MySUB) Возвращает абсолютный адрес процедуры или функции CALLFUNC Windows Unix CALLFUNC(Num, Param1, Param2, ...) Вызывает функцию по ее указателю (Call function pointer) CEIL Windows Unix CEIL(NumericExpression) Округляет величину к большему положительному значению (Rounds a numeric expression up towards positive infinity.) CHDIR Windows Unix CHDIR Path$ Изменить директорию (Change directory) CHR$ Windows Unix CHR$(Byte)
Возвращает символ по его ascii коду CINT Windows Unix CINT(NumericExpression)
Оставлено для совместимости. Используйте ROUND. CLNG Windows Unix CLNG(NumericExpression)
Implemented for compatibility reasons. Use ROUND instead. CONST Windows Unix CONST Variable = Expression
Присваивает Имя константу CONVBASE$ Windows Unix CONVBASE$(Str$, FromBase, ToBase)
Преобразует строковое представление числа Str$ от одного основания к другому. COS Windows Unix COS(NumericExpression)
Возвращает косинус от угла заданного в радианах DATA Windows Unix DATA constant|EXECUTE(...) [, constant|EXECUTE(...), ...]
хранит данные, используйте READ для чтения данных. DATE$ Windows Unix DATE$
Возвращает текущую дату в MM-DD-YYYY формате. DEC Windows Unix DEC(Variable [, DecVal])
Уменьшает переменную на 1 или на заданную вторым параметром величину DEF... Windows Unix DEF(...) Variable
DEFBYTE, DEFDBL, DEFDWORD, DEFINT, DEFLNG, DEFSHORT, DEFSNG, DEFSTR, DEFWORD выражения для объявления переменных DELETE$ Windows Unix DELETE$(S$, Index, Count)
Удаляет Count символов из строки S$ начиная с позиции Index DIM Windows Unix DIM Variable AS DataType
Создает переменную типа DataType DIR$ Windows DIR$[(FileSpec$, Attributes%)]
Возвращает следующий файл по заданной маске FileSpec$ DIREXISTS Windows DIREXISTS(Path$)
Возвращает 0 если директория не существует и не 0 - если существует DOEVENTS Windows DOEVENTS
Проверяет, не произошло ли событие для обновления окна во время долгого цикла (Polls events, useful when you're in a deep/big loop) END Windows Unix END
Завершение программы EXP Windows Unix EXP(NumericExpression)
Вычисляет функцию экспоненты (e^x) ENVIRON Windows Unix ENVIRON StringExpression
Устанавливает строку окружения ENVIRON$ Windows Unix ENVIRON$(environment-string)
Запрашивает строку окружения EXTRACTRESOURCE Windows Unix EXTRACTRESOURCE ResourceNumber%, FileName$
Извлекает ресурс в файл FIELD$ Windows Unix FIELD$(StringExpresion, Deliminator, FieldNumber)
Возвращает a field/token separated by deliminators. FILEEXISTS Windows Unix FILEEXISTS(FileName$)
Возвращает 0 if file not found, non-zero otherwise FIX Windows Unix FIX(NumericExpression)
Truncates fractional number, rounding down towards 0. FLOOR Windows Unix FLOOR(NumericExpression)
Rounds a numeric expression down towards negative infinity. FORMAT$ Windows Unix FORMAT$(S$, arg1, arg2, ...)
Возвращает a formatted string assembled from a format string and a series of arguments (up to 50) FRAC Windows Unix FRAC(NumericExpression)
Возвращает the fractional part of the numeric expression. HEX$ Windows Unix HEX$(NumericExpression)
Возвращает the HEXidecimal string representation of the NumericExpression INC Windows Unix INC(Variable [, IncVal])
Increments variable by 1 unless otherwise specified INITARRAY Windows Unix INITARRAY(Array, values, ...)
Initializes array with corresponding values INP Windows Unix INP(Address)
Возвращает the byte value read from an I/O port 0..65535 INPW Windows Unix INPW(Address)
Возвращает the word value read from an I/O port 0..65535 INSERT$ Windows Unix INSERT$(Source$, S$, Index)
Insert Source$ string to string S$ at Index INSTR Windows Unix INSTR([Start,] SearchString, FindString)
Function returns the position in the SearchString that FindString was found, 0 otherwise INT Windows Unix INT(NumericExpression)
Convert NumericExpression to a 32-bit INTEGER, truncating decimals. KILL Windows Unix KILL Filename$
Deletes file KILLMESSAGE Windows KILLMESSAGE hWnd, Message
Removes message from queue LBOUND Windows Unix LBOUND(ArrayName[, Dimension])
Возвращает the lowerbound of an array (Dimension starts at 1 LCASE$ Windows Unix LCASE$(StringExpression)
StringExpression is lowercased LEFT$ Windows Unix LEFT$(StringExpression, N)
Возвращает the leftmost N characters of a string LEN Windows Unix LEN(StringExpression)
Возвращает the length of string LFLUSH Windows LFLUSH
Calling this will start printing your document. Make sure all your LPRINTs are executed before calling LFLUSH. LIBRARYINST Windows LIBRARYINST(DLLName)
Возвращает the handle to a loaded DLL module LOG Windows Unix LOG(NumericExpression)
Возвращает the natural logarithm of NumericExpression LPRINT Windows LPRINT [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 Unix LTRIM$(StringExpression)
Возвращает string with left padded spaces removed MEMCMP Windows Unix MEMCMP(ptr1, ptr2, count)
Compares 2 memory addresses, returns 0 if not equal, non-zero otherwise. MEMCPY Windows Unix MEMCPY(destination, source, count)
Copies count bytes of source memory address to destination memory address. MEMSET Windows Unix MEMSET(source, char, n)
Initializes a source memory block with n bytes of char. MESSAGEBOX Windows MESSAGEBOX(Msg$, Title$, MsgButtons%)
Displays a simple message box with prompts MESSAGEDLG Windows MESSAGEDLG(Msg$, MsgType, MsgButtons, HelpContext)
Displays a message dialog box, see RAPIDQ.INC for proper types & buttons MID$ Windows Unix MID$(StringExpression, I, N) Возвращает string with characters from I to N of StringExpression MKDIR Windows Unix MKDIR Dir$ Creates new directory OUT Windows Unix OUT(Address, bytevalue)
Sends a byte value to a machine I/O port 0..65535 OUTW Windows Unix OUTW(Address, wordvalue)
Sends a word value to a machine I/O port 0..65535 PLAYWAV Windows PLAYWAV FileName$|Resource_Handle, SndOption
Plays a WAV file, see RAPIDQ.INC for sndOptions POSTMESSAGE Windows POSTMESSAGE(Handle, uMsg, wParam, lParam)
Post message to handle, and does not block. Refer to your favourite WinAPI guide for the proper message numbers QUICKSORT Windows QUICKSORT(Array-begin, Array-end, ASCEND | DESCEND)
Sort any array, BYTE, WORD, SHORT, STRING, etc... RANDOMIZE Windows Unix RANDOMIZE [Num]
Use randomize to reseed the random number generator READ Windows Unix READ variable [, variable, ...]
Reads next DATA statement, stores it in variable. REDIM Windows Unix REDIM 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. RENAME Windows Unix RENAME File1$, File2$
Renames File1$ to File2$ REPLACE$ Windows Unix REPLACE$(S$, R$, Index)
Replaces a string from S$ with R$ starting at Index REPLACESUBSTR$ Windows Unix REPLACESUBSTR$(Source$, ReplaceStr$, Withstr$)
Replaces the string ReplaceStr$ in Source$ with WithStr$ RESTORE Windows Unix RESTORE [linelabel]
Jumps to specific position in DATA statement. RESOURCE Windows Unix RESOURCE(number%)
Get numeric value of Resource, mainly for use with ExtractResource, 0 based array. RESOURCECOUNT Windows Unix RESOURCECOUNT
Get resource count. REVERSE$ Windows Unix REVERSE$(S$)
Reverses a string RGB Windows Unix RGB(Red%, Green%, Blue%)
Возвращает the RGB numeric representation of the color. RIGHT$ Windows Unix RIGHT$(StringExpression, N)
Возвращает the righttmost N characters of a string RINSTR Windows Unix RINSTR([Start,] SearchString, FindString)
Reverse INSTR Function, searching starts from the end of SearchString RMDIR Windows Unix RMDIR Dir$
Removes directory RND Windows Unix RND(UpperBound)
Возвращает a random number, if no upperbound is given, it returns a decimal number. Use RANDOMIZE to reseed. ROUND Windows Unix ROUND(NumericExpression)
Rounds number to nearest integer. RTRIM$ Windows Unix RTRIM$(StringExpression)
Возвращает string with rightmost padded spaces removed RUN Windows Unix RUN command$
Executes command, but does not block SENDMESSAGE Windows SENDMESSAGE(Handle, uMsg, wParam, lParam)
Post message to handle, and blocks. Refer to your favourite WinAPI guide for the proper message numbers SGN Windows Unix SGN(NumericExpression)
Возвращает the sign of a numeric expression SHELL Windows Unix SHELL command$
Executes command, and blocks until finished SHOWMESSAGE Windows Unix SHOWMESSAGE msg$
Popups message in a simple box SIN Windows Unix SIN(NumericExpression)
Возвращает sine of an angle given in radians SOUND Windows SOUND freq, duration
Outputs sound through PC Speaker SPACE$ Windows Unix SPACE$(Num)
Возвращает string with Num spaces SQR Windows Unix SQR(NumericExpression)
Возвращает the square root of NumericExpression, make sure it's non-negative STATIC Windows Unix STATIC Variable AS DataType
Creates variable of type DataType and preserves variable between procedure calls STR$ Windows Unix STR$(NumericExpression)
Возвращает the string representation of the numeric expression STRF$ Windows STRF$(NumericExpression, Format%, Precision%, Digits%)
Converts a floating point or number value to a string STRING$ Windows Unix STRING$(m, n) or STRING$(m, StringExpression)
Возвращает a string m characters wide that only contains CHR$(n) character SWAP Windows Unix SWAP A, B
Exchanges values, so A = B and B = A TALLY Windows Unix TALLY(SearchString, MatchString)
Возвращает the number of occurrences of matchstring TAN/ATAN Windows Unix TAN(NumericExpression)
Возвращает tangent/arctangent of an angle given in radians TIME$ Windows Unix TIME$
Возвращает the current time in HH:MM:SS format. TIMER Windows Unix T! = TIMER
Возвращает the current TIMER value UBOUND Windows Unix UBOUND(ArrayName[, Dimension])
Возвращает the upperbound of array (Dimension starts at 1) UCASE$ Windows Unix UCASE$(StringExpression)
Возвращает a string whose characters have been uppercased UNLOADLIBRARY Windows UNLOADLIBRARY(DLLName)
Removes DLL from memory VAL Windows Unix VAL(StringExpression)
Возвращает the closest numeric representation of the string expression VARPTR Windows Unix VARPTR(variablename)
Возвращает the address of a variable. VARPTR$ Windows Unix VARPTR$(address)
Возвращает the null-terminated string representation of a given address. VARTYPE Windows Unix VARTYPE(variant)
Возвращает the type of a variant 0 - Integer, 1 - Float, 2 - String.


Prev Глава Up Содержание Next Глава