diff --git a/blog/2024-08-15-docs-add-chapters-of-keywords-etc.md b/blog/2024-08-15-docs-add-chapters-of-keywords-etc.md index bc29fed..567c14d 100644 --- a/blog/2024-08-15-docs-add-chapters-of-keywords-etc.md +++ b/blog/2024-08-15-docs-add-chapters-of-keywords-etc.md @@ -30,6 +30,6 @@ tags: `../language/qsp-keywords/qsp-keywords-functions.md` :::note[Потому что:] Докузаурус опускает расширение `.md` в ссылках и таким образом в процессе работы ссылки поддерживаются и в обсидиане и в докузаурусе. После сборки ссылки во всех статьях приобретают вид валидный для докузауруса, но невалидный для Обсидиана. - `https://dev.qsp.org/docs/language/qsp-keywords/qsp-keyword-operators` + `https://dev.qsp.org/docs/language/qsp-keywords/qsp-keywords-statements` ::: - Необходимо смириться с тем, что обсидиан не поддерживает те же якоря заголовков, что и докузаурус, из-за чего сослаться на заголовок в обсидиане так же как в докузаурусе невозможно. Это не мешает обсидиану поддерживать такие ссылки при изменении местоположения статей и разделов. diff --git a/docs/language/qsp-keywords/index.md b/docs/language/qsp-keywords/index.md index df32c34..d69a572 100644 --- a/docs/language/qsp-keywords/index.md +++ b/docs/language/qsp-keywords/index.md @@ -9,175 +9,175 @@ sidebar_position: 6 Вычеркнутые команды не работают в плеерах версии 5.8.0 и выше. ::: -- [Неявный оператор](qsp-keyword-operators#неявный-оператор) -- [`!` (комментарий)](qsp-keyword-operators.md#-комментарий) -- [`!` (не равно)](qsp-keyword-operacion.md#-не-равно-1) -- [`&` (конкатенация)](qsp-keyword-operacion.md#-конкатенация) -- [`&` (перечисление команд)](qsp-keyword-syntaxems.md#амперсанд-) -- [`:` (метки)](qsp-keyword-syntaxems.md#метки-) -- [`,` (разделитель аргументов)](qsp-keyword-syntaxems.md#запятая-) -- [`""` (кавычки)](qsp-keyword-syntaxems.md#кавычка-) -- [`''` (апострофы)](qsp-keyword-syntaxems.md#апостроф-) -- [`{}` (Фигурные скобки)](qsp-keyword-syntaxems.md#фигурные-скобки-) -- [`()` (круглые скобки)](qsp-keyword-syntaxems.md#круглые-скобки-) -- [`[]` (квадратные скобки)](qsp-keyword-syntaxems.md#квадратные-скобки-) -- [`@` (коммерческое "эт")](qsp-keyword-syntaxems#%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB-%D0%BA%D0%BE%D0%BC%D0%BC%D0%B5%D1%80%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5-%D1%8D%D1%82-) - 5.8.0 -- [`$` (знак доллара)](qsp-keyword-syntaxems#%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB-%D0%B7%D0%BD%D0%B0%D0%BA-%D0%B4%D0%BE%D0%BB%D0%BB%D0%B0%D1%80%D0%B0-) -- [`%` (знак процента)](qsp-keyword-syntaxems#%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB-%D0%B7%D0%BD%D0%B0%D0%BA-%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%BD%D1%82%D0%B0-) - 5.9.0 -- [`*`](qsp-keyword-operacion.md#-умножение) -- [`*=`](qsp-keyword-operacion.md#-умножение-присвоение) -- [`+`](qsp-keyword-operacion.md#-сложение) -- [`+=`](qsp-keyword-operacion.md#-сложение-присвоение) -- ~~[`+` (унарный)](qsp-keyword-operacion.md#--унарный-минус)~~ -- [`-`](qsp-keyword-operacion.md#--вычитание) -- [`-=`](qsp-keyword-operacion.md#--вычитание-присвоение) -- [`-` (унарный)](qsp-keyword-operacion.md#--унарный-минус) -- [`/`](qsp-keyword-operacion.md#-деление) -- [`/=`](qsp-keyword-operacion.md#-деление-присвоение) -- [`<`](qsp-keyword-operacion.md#-меньше) -- [`<=`](qsp-keyword-operacion.md#-меньше-либо-равно) -- [`<>`](qsp-keyword-operacion.md#-не-равно) -- [`=` (равно)](qsp-keyword-operacion.md#-равно) -- [`=` (присвоение)](qsp-keyword-operacion.md#-присвоение) -- [`=<`](qsp-keyword-operacion.md#-равно-либо-меньше) -- [`=>`](qsp-keyword-operacion.md#-равно-или-больше) -- [`>`](qsp-keyword-operacion.md#-больше) -- [`>=`](qsp-keyword-operacion.md#-больше-либо-равно) -- [`ACT`](qsp-keyword-operators.md#act) -- ~~[`ADDLIB`](qsp-keyword-operators.md#inclib)~~ -- [`ADDOBJ`](qsp-keyword-operators.md#addobj) -- ~~[`ADDQST`](qsp-keyword-operators.md#inclib)~~ -- [`AND`](qsp-keyword-operacion.md#and) -- [`ARGS`](qsp-keyword-sys-var.md#args) -- [`ARRCOMP`](qsp-keyword-functions.md#arrcomp) -- [`ARRITEM`](qsp-keyword-functions.md#arritem) - 5.8.0 -- [`ARRPACK`](qsp-keyword-functions.md#arrpack) - 5.9.1 -- [`ARRPOS`](qsp-keyword-functions.md#arrpos) -- [`ARRTYPE`](qsp-keyword-functions.md#arrtype) - 5.9.1 -- [`ARRSIZE`](qsp-keyword-functions.md#arrsize) -- [`$BACKIMAGE`](qsp-keyword-sys-var.md#backimage) -- [`BCOLOR`](qsp-keyword-sys-var.md#bcolor) -- [`CLA`](qsp-keyword-operators.md#cla) -- [`CLEAR`](qsp-keyword-operators.md#clear-1) -- [`*CLEAR`](qsp-keyword-operators.md#clear) -- [`CLOSE`](qsp-keyword-operators.md#close) -- [`CLOSE ALL`](qsp-keyword-operators.md#close-all) -- [`CLR`](qsp-keyword-operators.md#clear-1) -- [`*CLR`](qsp-keyword-operators.md#clear) -- [`CLS`](qsp-keyword-operators.md#cls) -- [`CMDCLEAR`](qsp-keyword-operators.md#cmdclear) -- [`CMDCLR`](qsp-keyword-operators.md#cmdclear) -- [`COPYARR`](qsp-keyword-operators.md#copyarr) -- [`$COUNTER`](qsp-keyword-sys-var.md#counter) -- [`COUNTOBJ`](qsp-keyword-functions.md#countobj) -- [`$CURACTS`](qsp-keyword-functions.md#curacts) -- [`$CURLOC`](qsp-keyword-functions.md#curloc) -- [`$CUROBJS`](qsp-keyword-functions.md#curobjs) - 5.9.0 -- [`DEBUG`](qsp-keyword-sys-var.md#debug) -- [`DELACT`](qsp-keyword-operators.md#delact) -- ~~[`DELLIB`](qsp-keyword-operators.md#freelib)~~ -- [`DELOBJ`](qsp-keyword-operators.md#delobj) -- [`$DESC`](qsp-keyword-functions.md#desc) -- [`DISABLESCROLL`](qsp-keyword-sys-var.md#disablescroll) -- ~~[`DISABLESUBEX`](qsp-keyword-sys-var.md#disablesubex)~~ -- [`DYNAMIC`](qsp-keyword-operators.md#dynamic) -- [`DYNEVAL`](qsp-keyword-functions.md#dyneval) -- [`ELSE`](qsp-keyword-operators.md#else) -- [`ELSEIF`](qsp-keyword-operators.md#elseif) -- [`END`](qsp-keyword-syntaxems.md#end) -- [`EXIT`](qsp-keyword-operators.md#exit) -- [`FCOLOR`](qsp-keyword-sys-var.md#fcolor) -- [`$FNAME`](qsp-keyword-sys-var.md#fname) -- [`FREELIB`](qsp-keyword-operators.md#freelib) - 5.8.0 -- [`FSIZE`](qsp-keyword-sys-var.md#fsize) -- [`FUNC`](qsp-keyword-functions.md#func) -- [`$GETOBJ`](qsp-keyword-functions.md#getobj) -- [`GOSUB`](qsp-keyword-operators.md#gosub) -- [`GOTO`](qsp-keyword-operators.md#goto) -- [`GS`](qsp-keyword-operators.md#gosub) -- [`GT`](qsp-keyword-operators.md#goto) -- [`IF`](qsp-keyword-operators.md#if) -- [`IIF`](qsp-keyword-functions.md#iif) -- [`INCLIB`](qsp-keyword-operators.md#inclib) - 5.8.0 -- [`$INPUT`](qsp-keyword-functions.md#input) -- [`INSTR`](qsp-keyword-functions.md#instr) -- [`ISNUM`](qsp-keyword-functions.md#isnum) -- [`ISPLAY`](qsp-keyword-functions.md#isplay) -- [`JUMP`](qsp-keyword-operators.md#jump) -- [`KILLALL`](qsp-keyword-operators.md#killall) -- [`KILLOBJ`](qsp-keyword-operators.md#killobj) -- ~~[`KILLQST`](qsp-keyword-operators.md#freelib)~~ -- [`KILLVAR`](qsp-keyword-operators.md#killvar) -- [`$LCASE`](qsp-keyword-functions.md#lcase) -- [`LCOLOR`](qsp-keyword-sys-var.md#lcolor) -- [`LEN`](qsp-keyword-functions.md#len) -- [`LET`](qsp-keyword-operators.md#let) -- [`LOC`](qsp-keyword-operacion.md#loc) -- [`LOCAL`](qsp-keyword-operators.md#local) - 5.8.0 -- [`LOOP`](qsp-keyword-operators.md#loop) - 5.8.0 -- [`$MAINTXT`](qsp-keyword-functions.md#maintxt) -- [`MAX`](qsp-keyword-functions.md#max) -- [`MENU`](qsp-keyword-operators.md#menu) -- [`$MID`](qsp-keyword-functions.md#mid) -- [`MIN`](qsp-keyword-functions.md#min) -- [`MOD`](qsp-keyword-operacion.md#mod) -- [`MSECSCOUNT`](qsp-keyword-functions.md#msecscount) -- [`MSG`](qsp-keyword-operators.md#msg) -- [`NL`](qsp-keyword-operators.md#nl-1) -- [`*NL`](qsp-keyword-operators.md#nl) -- [`NO`](qsp-keyword-operacion.md#no) -- [`NOSAVE`](qsp-keyword-sys-var.md#nosave) -- [`OBJ`](qsp-keyword-operacion.md#obj) -- [`$ONACTSEL`](qsp-keyword-sys-var.md#onactsel) -- [`$ONGLOAD`](qsp-keyword-sys-var.md#ongload) -- [`$ONGSAVE`](qsp-keyword-sys-var.md#ongsave) -- [`$ONNEWLOC`](qsp-keyword-sys-var.md#onnewloc) -- [`$ONOBJADD`](qsp-keyword-sys-var.md#onobjadd) -- [`$ONOBJDEL`](qsp-keyword-sys-var.md#onobjdel) -- [`$ONOBJSEL`](qsp-keyword-sys-var.md#onobjsel) -- [`OPENGAME`](qsp-keyword-operators.md#opengame) -- [`OPENQST`](qsp-keyword-operators.md#openqst) -- [`OR`](qsp-keyword-operacion.md#or) -- [`P`](qsp-keyword-operators.md#p-1) -- [`*P`](qsp-keyword-operators.md#p) -- [`PL`](qsp-keyword-operators.md#pl-1) -- [`*PL`](qsp-keyword-operators.md#pl) -- [`PLAY`](qsp-keyword-operators.md#play) -- [`$QSPVER`](qsp-keyword-functions.md#qspver) -- [`RAND`](qsp-keyword-functions.md#rand) -- [`REFINT`](qsp-keyword-operators.md#refint) -- [`$REPLACE`](qsp-keyword-functions.md#replace) -- [`RESULT`](qsp-keyword-sys-var.md#result) -- [`RGB`](qsp-keyword-functions.md#rgb) -- [`RND`](qsp-keyword-functions.md#rnd) -- [`SAVEGAME`](qsp-keyword-operators.md#savegame) -- [`SCANSTR`](qsp-keyword-operators.md#scanstr) - 5.9.0 -- [`$SELACT`](qsp-keyword-functions.md#selact) -- [`$SELOBJ`](qsp-keyword-functions.md#selobj) -- [`SET`](qsp-keyword-operators.md#set) -- [`SETTIMER`](qsp-keyword-operators.md#settimer) -- [`SETVAR`](qsp-keyword-operators.md#setvar) - 5.9.1 -- [`SHOWACTS`](qsp-keyword-operators.md#showacts) -- [`SHOWINPUT`](qsp-keyword-operators.md#showinput) -- [`SHOWOBJS`](qsp-keyword-operators.md#showobjs) -- [`SHOWSTAT`](qsp-keyword-operators.md#showstat) -- [`SORTARR`](qsp-keyword-operators.md#sortarr) - 5.9.0 -- [`$STATTXT`](qsp-keyword-functions.md#stattxt) -- [`$STR`](qsp-keyword-functions.md#str) -- [`STRCOMP`](qsp-keyword-functions.md#strcomp) -- [`$STRFIND`](qsp-keyword-functions.md#strfind) -- [`STRPOS`](qsp-keyword-functions.md#strpos) -- [`$TRIM`](qsp-keyword-functions.md#trim) -- [`$UCASE`](qsp-keyword-functions.md#ucase) -- [`UNPACKARR`](qsp-keyword-operators.md#unpackarr) - 5.9.1 -- [`UNSEL`](qsp-keyword-operators.md#unselect) -- [`UNSELECT`](qsp-keyword-operators.md#unselect) -- [`USEHTML`](qsp-keyword-sys-var.md#usehtml) -- [`$USERCOM`](qsp-keyword-sys-var.md#usercom) -- [`$USER_TEXT`](qsp-keyword-functions.md#user_text) -- [`$USRTXT`](qsp-keyword-functions.md#user_text) -- [`VAL`](qsp-keyword-functions.md#val) -- [`VIEW`](qsp-keyword-operators.md#view) -- [`WAIT`](qsp-keyword-operators.md#wait) -- [`XGOTO`](qsp-keyword-operators.md#xgoto) -- [`XGT`](qsp-keyword-operators.md#xgoto) +- [Неявный оператор](qsp-keywords-statements#неявный-оператор) +- [`!` (комментарий)](qsp-keywords-statements.md#-комментарий) +- [`!` (не равно)](qsp-keywords-operators.md#-не-равно-1) +- [`&` (конкатенация)](qsp-keywords-operators.md#-конкатенация) +- [`&` (перечисление команд)](qsp-keywords-syntaxems.md#амперсанд-) +- [`:` (метки)](qsp-keywords-syntaxems.md#метки-) +- [`,` (разделитель аргументов)](qsp-keywords-syntaxems.md#запятая-) +- [`""` (кавычки)](qsp-keywords-syntaxems.md#кавычка-) +- [`''` (апострофы)](qsp-keywords-syntaxems.md#апостроф-) +- [`{}` (Фигурные скобки)](qsp-keywords-syntaxems.md#фигурные-скобки-) +- [`()` (круглые скобки)](qsp-keywords-syntaxems.md#круглые-скобки-) +- [`[]` (квадратные скобки)](qsp-keywords-syntaxems.md#квадратные-скобки-) +- [`@` (коммерческое "эт")](qsp-keywords-syntaxems#%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB-%D0%BA%D0%BE%D0%BC%D0%BC%D0%B5%D1%80%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5-%D1%8D%D1%82-) - 5.8.0 +- [`$` (знак доллара)](qsp-keywords-syntaxems#%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB-%D0%B7%D0%BD%D0%B0%D0%BA-%D0%B4%D0%BE%D0%BB%D0%BB%D0%B0%D1%80%D0%B0-) +- [`%` (знак процента)](qsp-keywords-syntaxems#%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB-%D0%B7%D0%BD%D0%B0%D0%BA-%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%BD%D1%82%D0%B0-) - 5.9.0 +- [`*`](qsp-keywords-operators.md#-умножение) +- [`*=`](qsp-keywords-operators.md#-умножение-присвоение) +- [`+`](qsp-keywords-operators.md#-сложение) +- [`+=`](qsp-keywords-operators.md#-сложение-присвоение) +- ~~[`+` (унарный)](qsp-keywords-operators.md#--унарный-минус)~~ +- [`-`](qsp-keywords-operators.md#--вычитание) +- [`-=`](qsp-keywords-operators.md#--вычитание-присвоение) +- [`-` (унарный)](qsp-keywords-operators.md#--унарный-минус) +- [`/`](qsp-keywords-operators.md#-деление) +- [`/=`](qsp-keywords-operators.md#-деление-присвоение) +- [`<`](qsp-keywords-operators.md#-меньше) +- [`<=`](qsp-keywords-operators.md#-меньше-либо-равно) +- [`<>`](qsp-keywords-operators.md#-не-равно) +- [`=` (равно)](qsp-keywords-operators.md#-равно) +- [`=` (присвоение)](qsp-keywords-operators.md#-присвоение) +- [`=<`](qsp-keywords-operators.md#-равно-либо-меньше) +- [`=>`](qsp-keywords-operators.md#-равно-или-больше) +- [`>`](qsp-keywords-operators.md#-больше) +- [`>=`](qsp-keywords-operators.md#-больше-либо-равно) +- [`ACT`](qsp-keywords-statements.md#act) +- ~~[`ADDLIB`](qsp-keywords-statements.md#inclib)~~ +- [`ADDOBJ`](qsp-keywords-statements.md#addobj) +- ~~[`ADDQST`](qsp-keywords-statements.md#inclib)~~ +- [`AND`](qsp-keywords-operators.md#and) +- [`ARGS`](qsp-keywords-sys-var.md#args) +- [`ARRCOMP`](qsp-keywords-functions.md#arrcomp) +- [`ARRITEM`](qsp-keywords-functions.md#arritem) - 5.8.0 +- [`ARRPACK`](qsp-keywords-functions.md#arrpack) - 5.9.1 +- [`ARRPOS`](qsp-keywords-functions.md#arrpos) +- [`ARRTYPE`](qsp-keywords-functions.md#arrtype) - 5.9.1 +- [`ARRSIZE`](qsp-keywords-functions.md#arrsize) +- [`$BACKIMAGE`](qsp-keywords-sys-var.md#backimage) +- [`BCOLOR`](qsp-keywords-sys-var.md#bcolor) +- [`CLA`](qsp-keywords-statements.md#cla) +- [`CLEAR`](qsp-keywords-statements.md#clear-1) +- [`*CLEAR`](qsp-keywords-statements.md#clear) +- [`CLOSE`](qsp-keywords-statements.md#close) +- [`CLOSE ALL`](qsp-keywords-statements.md#close-all) +- [`CLR`](qsp-keywords-statements.md#clear-1) +- [`*CLR`](qsp-keywords-statements.md#clear) +- [`CLS`](qsp-keywords-statements.md#cls) +- [`CMDCLEAR`](qsp-keywords-statements.md#cmdclear) +- [`CMDCLR`](qsp-keywords-statements.md#cmdclear) +- [`COPYARR`](qsp-keywords-statements.md#copyarr) +- [`$COUNTER`](qsp-keywords-sys-var.md#counter) +- [`COUNTOBJ`](qsp-keywords-functions.md#countobj) +- [`$CURACTS`](qsp-keywords-functions.md#curacts) +- [`$CURLOC`](qsp-keywords-functions.md#curloc) +- [`$CUROBJS`](qsp-keywords-functions.md#curobjs) - 5.9.0 +- [`DEBUG`](qsp-keywords-sys-var.md#debug) +- [`DELACT`](qsp-keywords-statements.md#delact) +- ~~[`DELLIB`](qsp-keywords-statements.md#freelib)~~ +- [`DELOBJ`](qsp-keywords-statements.md#delobj) +- [`$DESC`](qsp-keywords-functions.md#desc) +- [`DISABLESCROLL`](qsp-keywords-sys-var.md#disablescroll) +- ~~[`DISABLESUBEX`](qsp-keywords-sys-var.md#disablesubex)~~ +- [`DYNAMIC`](qsp-keywords-statements.md#dynamic) +- [`DYNEVAL`](qsp-keywords-functions.md#dyneval) +- [`ELSE`](qsp-keywords-statements.md#else) +- [`ELSEIF`](qsp-keywords-statements.md#elseif) +- [`END`](qsp-keywords-syntaxems.md#end) +- [`EXIT`](qsp-keywords-statements.md#exit) +- [`FCOLOR`](qsp-keywords-sys-var.md#fcolor) +- [`$FNAME`](qsp-keywords-sys-var.md#fname) +- [`FREELIB`](qsp-keywords-statements.md#freelib) - 5.8.0 +- [`FSIZE`](qsp-keywords-sys-var.md#fsize) +- [`FUNC`](qsp-keywords-functions.md#func) +- [`$GETOBJ`](qsp-keywords-functions.md#getobj) +- [`GOSUB`](qsp-keywords-statements.md#gosub) +- [`GOTO`](qsp-keywords-statements.md#goto) +- [`GS`](qsp-keywords-statements.md#gosub) +- [`GT`](qsp-keywords-statements.md#goto) +- [`IF`](qsp-keywords-statements.md#if) +- [`IIF`](qsp-keywords-functions.md#iif) +- [`INCLIB`](qsp-keywords-statements.md#inclib) - 5.8.0 +- [`$INPUT`](qsp-keywords-functions.md#input) +- [`INSTR`](qsp-keywords-functions.md#instr) +- [`ISNUM`](qsp-keywords-functions.md#isnum) +- [`ISPLAY`](qsp-keywords-functions.md#isplay) +- [`JUMP`](qsp-keywords-statements.md#jump) +- [`KILLALL`](qsp-keywords-statements.md#killall) +- [`KILLOBJ`](qsp-keywords-statements.md#killobj) +- ~~[`KILLQST`](qsp-keywords-statements.md#freelib)~~ +- [`KILLVAR`](qsp-keywords-statements.md#killvar) +- [`$LCASE`](qsp-keywords-functions.md#lcase) +- [`LCOLOR`](qsp-keywords-sys-var.md#lcolor) +- [`LEN`](qsp-keywords-functions.md#len) +- [`LET`](qsp-keywords-statements.md#let) +- [`LOC`](qsp-keywords-operators.md#loc) +- [`LOCAL`](qsp-keywords-statements.md#local) - 5.8.0 +- [`LOOP`](qsp-keywords-statements.md#loop) - 5.8.0 +- [`$MAINTXT`](qsp-keywords-functions.md#maintxt) +- [`MAX`](qsp-keywords-functions.md#max) +- [`MENU`](qsp-keywords-statements.md#menu) +- [`$MID`](qsp-keywords-functions.md#mid) +- [`MIN`](qsp-keywords-functions.md#min) +- [`MOD`](qsp-keywords-operators.md#mod) +- [`MSECSCOUNT`](qsp-keywords-functions.md#msecscount) +- [`MSG`](qsp-keywords-statements.md#msg) +- [`NL`](qsp-keywords-statements.md#nl-1) +- [`*NL`](qsp-keywords-statements.md#nl) +- [`NO`](qsp-keywords-operators.md#no) +- [`NOSAVE`](qsp-keywords-sys-var.md#nosave) +- [`OBJ`](qsp-keywords-operators.md#obj) +- [`$ONACTSEL`](qsp-keywords-sys-var.md#onactsel) +- [`$ONGLOAD`](qsp-keywords-sys-var.md#ongload) +- [`$ONGSAVE`](qsp-keywords-sys-var.md#ongsave) +- [`$ONNEWLOC`](qsp-keywords-sys-var.md#onnewloc) +- [`$ONOBJADD`](qsp-keywords-sys-var.md#onobjadd) +- [`$ONOBJDEL`](qsp-keywords-sys-var.md#onobjdel) +- [`$ONOBJSEL`](qsp-keywords-sys-var.md#onobjsel) +- [`OPENGAME`](qsp-keywords-statements.md#opengame) +- [`OPENQST`](qsp-keywords-statements.md#openqst) +- [`OR`](qsp-keywords-operators.md#or) +- [`P`](qsp-keywords-statements.md#p-1) +- [`*P`](qsp-keywords-statements.md#p) +- [`PL`](qsp-keywords-statements.md#pl-1) +- [`*PL`](qsp-keywords-statements.md#pl) +- [`PLAY`](qsp-keywords-statements.md#play) +- [`$QSPVER`](qsp-keywords-functions.md#qspver) +- [`RAND`](qsp-keywords-functions.md#rand) +- [`REFINT`](qsp-keywords-statements.md#refint) +- [`$REPLACE`](qsp-keywords-functions.md#replace) +- [`RESULT`](qsp-keywords-sys-var.md#result) +- [`RGB`](qsp-keywords-functions.md#rgb) +- [`RND`](qsp-keywords-functions.md#rnd) +- [`SAVEGAME`](qsp-keywords-statements.md#savegame) +- [`SCANSTR`](qsp-keywords-statements.md#scanstr) - 5.9.0 +- [`$SELACT`](qsp-keywords-functions.md#selact) +- [`$SELOBJ`](qsp-keywords-functions.md#selobj) +- [`SET`](qsp-keywords-statements.md#set) +- [`SETTIMER`](qsp-keywords-statements.md#settimer) +- [`SETVAR`](qsp-keywords-statements.md#setvar) - 5.9.1 +- [`SHOWACTS`](qsp-keywords-statements.md#showacts) +- [`SHOWINPUT`](qsp-keywords-statements.md#showinput) +- [`SHOWOBJS`](qsp-keywords-statements.md#showobjs) +- [`SHOWSTAT`](qsp-keywords-statements.md#showstat) +- [`SORTARR`](qsp-keywords-statements.md#sortarr) - 5.9.0 +- [`$STATTXT`](qsp-keywords-functions.md#stattxt) +- [`$STR`](qsp-keywords-functions.md#str) +- [`STRCOMP`](qsp-keywords-functions.md#strcomp) +- [`$STRFIND`](qsp-keywords-functions.md#strfind) +- [`STRPOS`](qsp-keywords-functions.md#strpos) +- [`$TRIM`](qsp-keywords-functions.md#trim) +- [`$UCASE`](qsp-keywords-functions.md#ucase) +- [`UNPACKARR`](qsp-keywords-statements.md#unpackarr) - 5.9.1 +- [`UNSEL`](qsp-keywords-statements.md#unselect) +- [`UNSELECT`](qsp-keywords-statements.md#unselect) +- [`USEHTML`](qsp-keywords-sys-var.md#usehtml) +- [`$USERCOM`](qsp-keywords-sys-var.md#usercom) +- [`$USER_TEXT`](qsp-keywords-functions.md#user_text) +- [`$USRTXT`](qsp-keywords-functions.md#user_text) +- [`VAL`](qsp-keywords-functions.md#val) +- [`VIEW`](qsp-keywords-statements.md#view) +- [`WAIT`](qsp-keywords-statements.md#wait) +- [`XGOTO`](qsp-keywords-statements.md#xgoto) +- [`XGT`](qsp-keywords-statements.md#xgoto) diff --git a/docs/language/qsp-keywords/qsp-keyword-functions.md b/docs/language/qsp-keywords/qsp-keywords-functions.md similarity index 97% rename from docs/language/qsp-keywords/qsp-keyword-functions.md rename to docs/language/qsp-keywords/qsp-keywords-functions.md index a14842a..ee32c63 100644 --- a/docs/language/qsp-keywords/qsp-keyword-functions.md +++ b/docs/language/qsp-keywords/qsp-keywords-functions.md @@ -119,7 +119,7 @@ dyneval("code = 123 + 890") code ``` -См. также [оператор `DYNAMIC`](qsp-keyword-operators.md#dynamic). +См. также [оператор `DYNAMIC`](qsp-keywords-statements.md#dynamic). ## `$FUNC` @@ -211,7 +211,7 @@ $name_loc = "summ" *pl func($name_loc, 23) & ! выведет на экран 276 ``` -Также см. ["Неявный вызов функции `FUNC`"](qsp-keyword-syntaxems.md#%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB-%D0%BA%D0%BE%D0%BC%D0%BC%D0%B5%D1%80%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5-%D1%8D%D1%82-). +Также см. ["Неявный вызов функции `FUNC`"](qsp-keywords-syntaxems.md#%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB-%D0%BA%D0%BE%D0%BC%D0%BC%D0%B5%D1%80%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5-%D1%8D%D1%82-). ## `$GETOBJ` @@ -526,7 +526,7 @@ $qspver('platform') $REPLACE([$строка], [$поиск], [$замена], [#число_замен]) ``` -Данная функция заменяет в строке `[$строка]` несколько вхождений строки `[$поиск]` строкой `[$замена]` и возвращает результат. Замена производится слева-направо и только для непересекающихся вхождений. Параметр `[#число_замен]` показывает, сколько вхождений должно быть заменено. Если параметр не указан, производится замена всех вхождений. Если `[$замена]` отсутствует или указана пустая строка, то удаляет в исходной строке все вхождения искомой строки. Примеры: +Данная функция заменяет в строке `[$строка]` несколько вхождений строки `[$поиск]` строкой `[$замена]` и возвращает результат. Замена производится слева-направо и только для непересекающихся вхождений. Параметр `[#число_замен]` показывает, сколько вхождений должно быть заменено. Если параметр не указан, производится замена всех вхождений. Если `[$замена]` отсутствует или указана пустая строка, то удаляет в исходной строке все вхождения искомой строки. Примеры: ```qsp $replace('test', '12', '4') & ! выведет на экран 'test' @@ -563,13 +563,13 @@ act "Съесть яблоко": end ``` -Так же смотрите примеры использования в разделе [`$onactsel`](qsp-keyword-sys-var.md#onactsel) +Так же смотрите примеры использования в разделе [`$onactsel`](qsp-keywords-sys-var.md#onactsel) ## `$SELOBJ` `$SELOBJ` — возвращает название выделенного предмета в любом месте игры. Выделение предмета происходит в момент нажатия (щелчка мышью по предмету) и не снимается до применения команды `unselect`. -Пример использования можно посмотреть в разделе [`$onobjsel`](qsp-keyword-sys-var.md#onobjsel) +Пример использования можно посмотреть в разделе [`$onobjsel`](qsp-keywords-sys-var.md#onobjsel) ## `$STATTXT` @@ -718,7 +718,7 @@ $ucase('Я хочу на вас орать.') & ! вернёт 'Я ХОЧУ НА act "Что я написал?": pl 'Я написал: "<<$user_text>>".' ``` -Более распространённый пример представлен в разделе [`$usercom`](qsp-keyword-sys-var.md#usercom). +Более распространённый пример представлен в разделе [`$usercom`](qsp-keywords-sys-var.md#usercom). ## ARRCOMP @@ -731,7 +731,7 @@ ARRCOMP([$имя_массива], [$шаблон], [#начало]) , где `[#начало]` — номер элемента массива, с которого следует начать поиск, `[$имя_массива]` — название массива, по которому нужно произвести поиск, `[$шаблон]` — регулярное выражение, с которым будет сравниваться искомый элемент. - Параметр `[#начало]` может отсутствовать, при этом его значение принимается равным 0. -- Поиск работает только по текстовым массивам (символ `$` в названии массива можно опустить). +- Поиск работает только по текстовым массивам (символ `$` в названии массива можно опустить). Для примера возьмём вот такой массив: @@ -927,6 +927,7 @@ ARRPOS([#начало], [$имя_массива], [$шаблон]) ## ARRTYPE `ARRTYPE` — возвращает тип значения, хранящегося в переменной, или указанной ячейке массива. Тип возвращается в виде одного из следующих значений: + - `''` (пустая строка) — значение не определено (например, для неинициализированных переменных); - `'#'` — переменная содержит число; - `'$'` — переменная содержит строку; @@ -966,7 +967,7 @@ ARRSIZE([$имя_массива]) , где `[$имя_массива]` — название массива, размер которого хотим получить. -Не имеет значения, указываете ли вы **`$`** перед названием массива или нет. Подсчитывается общее число ячеек и со строковыми, и с числовыми значениями. Для примера: +Не имеет значения, указываете ли вы **`$`** перед названием массива или нет. Подсчитывается общее число ячеек и со строковыми, и с числовыми значениями. Для примера: ```qsp n = ARRSIZE('a') @@ -1121,7 +1122,7 @@ RAND([#выражение 1], [#выражение 2], [#мода]) , где `[#выражение 1]` и `[#выражение 2]` — два любых числа или числовых выражения. -Параметр `[#мода]` позволяет указать число, которое должно выпадать более часто, чем остальные. При этом распределение частоты выпадения будет плавно изменяться для всех остальных чисел, уменьшаясь от моды к пределам выбранного интервала. Если 3й параметр не указан, то функция возвращает случайное число в заданном диапазоне с равномерным/равновероятным распределением чисел. +Параметр `[#мода]` позволяет указать число, которое должно выпадать более часто, чем остальные. При этом распределение частоты выпадения будет плавно изменяться для всех остальных чисел, уменьшаясь от моды к пределам выбранного интервала. Если 3й параметр не указан, то функция возвращает случайное число в заданном диапазоне с равномерным/равновероятным распределением чисел. Параметр `[#выражение 2]` может отсутствовать, при этом он принимается равным `1`. diff --git a/docs/language/qsp-keywords/qsp-keyword-operacion.md b/docs/language/qsp-keywords/qsp-keywords-operators.md similarity index 99% rename from docs/language/qsp-keywords/qsp-keyword-operacion.md rename to docs/language/qsp-keywords/qsp-keywords-operators.md index 98bce6d..f7549de 100644 --- a/docs/language/qsp-keywords/qsp-keyword-operacion.md +++ b/docs/language/qsp-keywords/qsp-keywords-operators.md @@ -235,7 +235,7 @@ number *= [4,5] & ! ошибка о несоответствии типов да 37+100 & ! вернёт 137 ``` -При "суммировании" строковых значений производится [конкатенация](qsp-keyword-operacion.md#-конкатенация), то есть "склеивание" строк: +При "суммировании" строковых значений производится [конкатенация](qsp-keywords-operators.md#-конкатенация), то есть "склеивание" строк: ```qsp ! на экран будет выведена строка "2627" @@ -283,7 +283,7 @@ warrior = warrior + 15 warrior += 15 ``` -Возможно так же проводить инкремент со строковыми значениями, работает как [конкатенация](qsp-keyword-operacion.md#-конкатенация): +Возможно так же проводить инкремент со строковыми значениями, работает как [конкатенация](qsp-keywords-operators.md#-конкатенация): ```qsp $text += " (может быть тут что-то написано)" @@ -1088,7 +1088,7 @@ no [выражение_1] = [выражение_2] ::: :::tip -Не рекомендуется использовать данную операцию для объединения строк, поскольку строки можно объединять через [`+`](qsp-keyword-operacion.md#-сложение): +Не рекомендуется использовать данную операцию для объединения строк, поскольку строки можно объединять через [`+`](qsp-keywords-operators.md#-сложение): ```qsp ! на экран будет выведена строка "2627" diff --git a/docs/language/qsp-keywords/qsp-keyword-operators.md b/docs/language/qsp-keywords/qsp-keywords-statements.md similarity index 94% rename from docs/language/qsp-keywords/qsp-keyword-operators.md rename to docs/language/qsp-keywords/qsp-keywords-statements.md index e2ceed4..51f2290 100644 --- a/docs/language/qsp-keywords/qsp-keyword-operators.md +++ b/docs/language/qsp-keywords/qsp-keywords-statements.md @@ -416,7 +416,7 @@ dynamic " ", 'Текст', 'Вилка' ``` -Нижеследующая информация справедлива и для функции [`dyneval`](qsp-keyword-functions.md#dyneval). +Нижеследующая информация справедлива и для функции [`dyneval`](qsp-keywords-functions.md#dyneval). **Важно!** Если код задан с помощью апострофов (`''`) или кавычек (`""`), в тексте вычисляются подвыражения: @@ -581,16 +581,16 @@ IF [#выражение]: END ``` -В данном случае, если верно условие `[#выражение]`, выполняются команды `{команда 1}`, `{команда 2}` и т.д. +В данном случае, если верно условие `[#выражение]`, выполняются команды `{команда 1}`, `{команда 2}` и т.д. -- Для **однострочной формы** записи это будут только те команды, которые идут в той же строке, что и оператор `IF` до конца строки; -- а для **многострочной формы** записи это будут те команды, которые идут в последующих строках после двоеточия и до специального ключевого слова `END`. +- Для **однострочной формы** записи это будут только те команды, которые идут в той же строке, что и оператор `IF` до конца строки; +- а для **многострочной формы** записи это будут те команды, которые идут в последующих строках после двоеточия и до специального ключевого слова `END`. В качестве условия могут выступать операции сравнения, логические операции и иные выражения, возвращающие числовые значения. -Ключевое слово `END` при многострочной форме записи должно стоять отдельной строкой. +Ключевое слово `END` при многострочной форме записи должно стоять отдельной строкой. -Если условие `[#выражение]` не верно, команды выполнены не будут. +Если условие `[#выражение]` не верно, команды выполнены не будут. Примеры однострочной формы записи условий: @@ -703,10 +703,10 @@ if abcd=3: k1=34 else k1=25 end ## ELSE -`ELSE` — ключевое слово, использующееся совместно с оператором `IF`, и которое служит для предоставления альтернативы, если условие не выполнено. Ключевое слово `ELSE` так же имеет две формы записи: однострочную и многострочную. +`ELSE` — ключевое слово, использующееся совместно с оператором `IF`, и которое служит для предоставления альтернативы, если условие не выполнено. Ключевое слово `ELSE` так же имеет две формы записи: однострочную и многострочную. -- Многострочную форму записи `ELSE` можно использовать только в многострочной конструкции оператора `IF`, -- однострочную форму записи можно использовать как в однострочной, так и в многострочной, конструкции оператора `IF`. Общая форма записи: +- Многострочную форму записи `ELSE` можно использовать только в многострочной конструкции оператора `IF`, +- однострочную форму записи можно использовать как в однострочной, так и в многострочной, конструкции оператора `IF`. Общая форма записи: ```qsp ! однострочная форма записи @@ -736,15 +736,15 @@ ELSE {команда н1} & {команда н2} & ... END ``` -Здесь, если условие`[#выражение]` верно, выполняются команды от двоеточия до ключевого слова `ELSE`, а если условие `[#выражение]` не верно, выполняются команды от ключевого слова `ELSE` и до конца конструкции условия. +Здесь, если условие`[#выражение]` верно, выполняются команды от двоеточия до ключевого слова `ELSE`, а если условие `[#выражение]` не верно, выполняются команды от ключевого слова `ELSE` и до конца конструкции условия. -После `ELSE` можно ставить, а можно не ставить двоеточие. +После `ELSE` можно ставить, а можно не ставить двоеточие. **При однострочной форме записи:** -- и команды и ключевое слово `ELSE` должны быть записаны в одной строке +- и команды и ключевое слово `ELSE` должны быть записаны в одной строке - окончанием альтернативного списка команд является конец строки. -- если однострочная форма записи `ELSE` используется в многострочной форме записи `IF`, все команды, которые идут в последующих строках после `ELSE` до `END` игнорируются. +- если однострочная форма записи `ELSE` используется в многострочной форме записи `IF`, все команды, которые идут в последующих строках после `ELSE` до `END` игнорируются. Примеры однострочной записи: @@ -769,7 +769,7 @@ end **При многострочной форме записи:** -- все команды должны идти в последующих строках после `ELSE`; +- все команды должны идти в последующих строках после `ELSE`; Примеры многострочной записи: @@ -795,10 +795,10 @@ end ## ELSEIF -`ELSEIF` — ключевое слово, которое используется совместно с оператором `IF` и позволяет определять на одном уровне вложенности последовательно-исключающие условия. Имеет однострочную и многострочную формы записи. +`ELSEIF` — ключевое слово, которое используется совместно с оператором `IF` и позволяет определять на одном уровне вложенности последовательно-исключающие условия. Имеет однострочную и многострочную формы записи. -- Многострочную форму записи можно использовать только в многострочных конструкциях с оператором `IF`, -- однострочную — как в многострочных, так и в однострочных конструкциях с оператором `IF`. +- Многострочную форму записи можно использовать только в многострочных конструкциях с оператором `IF`, +- однострочную — как в многострочных, так и в однострочных конструкциях с оператором `IF`. Общие формы записи: @@ -830,13 +830,13 @@ ELSE {последний набор команд} END ``` -Работает это следующим образом. Если `[#выражение 1]` верно, выполняются команды `{набор команд 1}`. Если `[#выражение 1]` неверно, но верно `[#выражение 2]`, выполняются команды `{набор команд 2}`, и т.д. И только если неверны все выражения в текущей конструкции условия, выполнятся команды после `ELSE`. Верность выражения `[#выражение 1]` не исключает верности выражения `[#выражение 2]`, однако верность выражения `[#выражение 2]` исключает верность выражения `[#выражение 1]`. +Работает это следующим образом. Если `[#выражение 1]` верно, выполняются команды `{набор команд 1}`. Если `[#выражение 1]` неверно, но верно `[#выражение 2]`, выполняются команды `{набор команд 2}`, и т.д. И только если неверны все выражения в текущей конструкции условия, выполнятся команды после `ELSE`. Верность выражения `[#выражение 1]` не исключает верности выражения `[#выражение 2]`, однако верность выражения `[#выражение 2]` исключает верность выражения `[#выражение 1]`. -Особенности записи `ELSEIF`: +Особенности записи `ELSEIF`: -- Может использоваться вариант написания `ELSE IF`. Работает точно так же. -- Если в многострочной конструкции `IF` после `ELSEIF` операторы идут в той же самой строке (однострочная форма), то все последующие строки игнорируются до следующего `ELSEIF`, либо до `ELSE` или `END`. -- В конструкции `IF` c `ELSEIF` может как присутствовать, так и отсутствовать часть с `ELSE`. +- Может использоваться вариант написания `ELSE IF`. Работает точно так же. +- Если в многострочной конструкции `IF` после `ELSEIF` операторы идут в той же самой строке (однострочная форма), то все последующие строки игнорируются до следующего `ELSEIF`, либо до `ELSE` или `END`. +- В конструкции `IF` c `ELSEIF` может как присутствовать, так и отсутствовать часть с `ELSE`. Примеры: @@ -860,7 +860,7 @@ elseif money mod 10=0 or money mod 10>4 or (money mod 100>10 and money mod 100<2 end ``` -Пример записи `ELSEIF` с операторами в той же строке: +Пример записи `ELSEIF` с операторами в той же строке: ```qsp ! реализация switch/case на QSP @@ -909,7 +909,7 @@ inclib "res/intro.qsp" JUMP [$метка] ``` -, где `[$метка]` — это метка ниже или выше по коду (см. раздел ["Метки"](qsp-keyword-syntaxems.md#метки-)). +, где `[$метка]` — это метка ниже или выше по коду (см. раздел ["Метки"](qsp-keywords-syntaxems.md#метки-)). `jump` находит метку только в пределах текущего блока кода, то есть метки локальны. @@ -1043,10 +1043,11 @@ KILLVAR 'a', 1 ## LET -`LET` — устаревший оператор для установки значения переменной. Общая запись: +`LET` — устаревший оператор для установки значений переменных. Общая запись: ```qsp LET [название переменной] = [выражение] +LET [переменная 1], [переменная 2], ... = [значение 1], [значение 2], ... ``` , где `[название переменной]` — это допустимое имя переменной, `[выражение]` — это допустимое для данной переменной значение. @@ -1064,13 +1065,17 @@ let $text = "text string" let abs = 123 ! задаём кортеж let %tuple = [123, "text string"] +! множественное присваивание +let unit_power, $unit_name = 1300, 'DiggerBull' +! распаковка кортежа +let $name, age, height = %npc_fields ``` :::tip Данный оператор считается устаревшим. Используйте вместо него оператор `set`, и только в тех случаях, когда это улучшит читаемость кода. ```qsp -! присвоение можно проводить без операторов set или let: +! присвоение можно проводить без операторов `set` или `let`: $text = "text string" ``` @@ -1118,10 +1123,10 @@ local arr Собственные локальные переменные можно создавать в следующих блоках кода: - Локации сами по себе. -- Код, передаваемый оператору `DYNAMIC`, или функции `DYNEVAL`, в виде текста. +- Код, передаваемый оператору `DYNAMIC`, или функции `DYNEVAL`, в виде текста. - Код, выполняемый при нажатии на гиперссылку. -- Код каждого отдельного Действия ([ACT](qsp-keyword-operators.md#act)). -- Код каждого отдельного Цикла ([LOOP](qsp-keyword-operators.md#loop)) +- Код каждого отдельного Действия ([ACT](qsp-keywords-statements.md#act)). +- Код каждого отдельного Цикла ([LOOP](qsp-keywords-statements.md#loop)) :::warning[**Внимание!**] У локальных переменных есть одна особенность, которую нужно очень чётко понимать. Значение объявленной в данном блоке кода локальной переменной транслируется и во все вложенные, или вызванные из данного, блоки кода. Например, если на локации объявлена локальная переменная, то её значение транслируется во все вызываемые с помощью `GOSUB` или `FUNC` локации, в блоки кода для `DYNAMIC`/`DYNEVAL`, в блоки циклов и так далее. Пример: @@ -1307,7 +1312,7 @@ MENU [$название массива] Здесь название массива (`%stone`) - это название меню, а кортежи - действия, для которых указаны названия пунктов и названия локаций-обработчиков выбора пунктов меню. При выборе пункта "Взять камень" произойдёт вызов локации с названием "takestone". Аналогично будет происходить с другими пунктами. -Чтобы вывести меню на экран, нужно воспользоваться оператором `MENU`: +Чтобы вывести меню на экран, нужно воспользоваться оператором `MENU`: ```qsp menu '%stone' @@ -1514,7 +1519,7 @@ opengame "1.sav" opengame ``` -См. также локацию-обработчик события загрузки состояния игры ([$ongload](qsp-keyword-sys-var.md#ongload)). +См. также локацию-обработчик события загрузки события загрузки состояния игры ([$ongload](qsp-keywords-sys-var.md#ongload)). ## OPENQST @@ -1628,7 +1633,7 @@ savegame "1.sav" savegame ``` -См. также [локацию-обработчик события сохранения состояния игры ($ongsave)](qsp-keyword-sys-var.md#ongsave). +См. также [локацию-обработчик события сохранения состояния игры ($ongsave)](qsp-keywords-sys-var.md#ongsave). ## SCANSTR @@ -1661,10 +1666,11 @@ scanstr '$words', $text, '\[(.*?)\]', 1 ## SET -`SET` — оператор для установки значения переменной. Общая запись: +`SET` — оператор для установки значений переменных. Общая запись: ```qsp SET [название переменной] = [выражение] +SET [переменная 1], [переменная 2], ... = [значение 1], [значение 2], ... ``` , где `[название переменной]` — это допустимое имя переменной, `[выражение]` — это допустимое для данной переменной значение. @@ -1678,6 +1684,10 @@ set $text = "text string" set abs = 123 ! задаём кортеж set %tuple = [27, 184, 'steel'] +! множественное присваивание +set unit_power, $unit_name = 1300, 'DiggerBull' +! распаковка кортежа +set $name, age, height = %npc_fields ``` :::note[Рекомендация:] @@ -1866,11 +1876,11 @@ showstat off & ! скрывает окно дополнительного опи SORTARR [$имя_массива], [#порядок] ``` - Здесь `[$имя_массива]` — название массива, который нужно отсортировать. Параметр `[#порядок]` можно не указывать. Если не указан или равен `0`, то сортирует массив по возрастанию (от меньшего к большему). Если равен `1`, то сортирует массив по убыванию (от большего к меньшему). + Здесь `[$имя_массива]` — название массива, который нужно отсортировать. Параметр `[#порядок]` можно не указывать. Если не указан или равен `0`, то сортирует массив по возрастанию (от меньшего к большему). Если равен `1`, то сортирует массив по убыванию (от большего к меньшему). Может сортировать массивы любых типов (числа, строки, кортежи), но не допускается смешивать значения разных типов в одном массиве. -Для указания типа сортируемых значений нужно указать префикс типа как часть имени массива (`$`, `%`). +Для указания типа сортируемых значений нужно указать префикс типа как часть имени массива (`$`, `%`). Пример сортировки текстового массива: diff --git a/docs/language/qsp-keywords/qsp-keyword-syntaxems.md b/docs/language/qsp-keywords/qsp-keywords-syntaxems.md similarity index 97% rename from docs/language/qsp-keywords/qsp-keyword-syntaxems.md rename to docs/language/qsp-keywords/qsp-keywords-syntaxems.md index 469dd47..1ef6aab 100644 --- a/docs/language/qsp-keywords/qsp-keyword-syntaxems.md +++ b/docs/language/qsp-keywords/qsp-keywords-syntaxems.md @@ -4,9 +4,9 @@ sidebar_position: 5 # Синтаксемы и спецсимволы -:::tips[Определение] +:::tip[Определение] -В контексте программирования синтаксема может рассматриваться как **минимальная единица синтаксиса**, которая определяет структуру и правила написания кода. +В контексте программирования синтаксема может рассматриваться как **минимальная единица синтаксиса**, которая определяет структуру и правила написания кода. Так синтаксемой может быть переменная, оператор, функция, ключевое слово объявления, или специальные символы, с помощью которых мы структурируем код. @@ -91,7 +91,7 @@ end присутствие этого текста после end не одоб ## Метки `:` -Метки — это особые синтаксические конструкции (а вернее меньше, чем конструкции, — синтаксемы), которые отмечают указанную строку кода и служат для быстрого перемещения к таким строкам с помощью оператора [`JUMP`](qsp-keyword-operators.md#jump). Общая запись: +Метки — это особые синтаксические конструкции (а вернее меньше, чем конструкции, — синтаксемы), которые отмечают указанную строку кода и служат для быстрого перемещения к таким строкам с помощью оператора [`JUMP`](qsp-keywords-statements.md#jump). Общая запись: ```qsp :[название метки] @@ -164,7 +164,7 @@ jump "FoR" [команда 1] & [команда 2] & ... ``` -Данный символ не следует путать с [операцией объединения строк](qsp-keyword-operacion.md#-конкатенация) (конкатенация), а использовать нужно с осторожностью. +Данный символ не следует путать с [операцией объединения строк](qsp-keywords-operators.md#-конкатенация) (конкатенация), а использовать нужно с осторожностью. Примеры: @@ -455,7 +455,7 @@ end Неявный вызов локации-функции заменяет и `gosub`, и `func`, поэтому: 1. если ваша локация-функция возвращает результат, неявный вызов такой локации будет работать точно так же, как явный вызов через `func`; -2. если же локация-функция не возвращает результат, то при использовании её с **[неявным оператором](qsp-keyword-operators.md#неявный-оператор)** она будет работать, как явный вызов через `gosub`. +2. если же локация-функция не возвращает результат, то при использовании её с **[неявным оператором](qsp-keywords-statements.md#неявный-оператор)** она будет работать, как явный вызов через `gosub`. ::: diff --git a/docs/language/qsp-keywords/qsp-keyword-sys-var.md b/docs/language/qsp-keywords/qsp-keywords-sys-var.md similarity index 100% rename from docs/language/qsp-keywords/qsp-keyword-sys-var.md rename to docs/language/qsp-keywords/qsp-keywords-sys-var.md diff --git a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/index.md b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/index.md index 5c3aad1..4524695 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/index.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/index.md @@ -9,175 +9,175 @@ sidebar_position: 6 Crossed out commands do not work in players version 5.8.0 and above. ::: -- [Implicit operator](qsp-keyword-operators#implicit-operator) -- [`!` (comment)](qsp-keyword-operators.md#-comment) -- [`!` (not equal)](qsp-keyword-operacion.md#-not-equal-1) -- [`&` (concatenation)](qsp-keyword-operacion.md#-concatenation) -- [`&` (command enumeration)](qsp-keyword-syntaxems.md#ampersand-) -- [`:` (labels)](qsp-keyword-syntaxems.md#labels-) -- [`,` (argument separator)](qsp-keyword-syntaxems.md#comma-) -- [`""` (quotes)](qsp-keyword-syntaxems.md#quote-) -- [`''` (apostrophes)](qsp-keyword-syntaxems.md#apostrophe-) -- [`{}` (Curly braces)](qsp-keyword-syntaxems.md#curly-braces-) -- [`()` (round brackets)](qsp-keyword-syntaxems.md#round-brackets-) -- [`[]` (square brackets)](qsp-keyword-syntaxems.md#square-brackets-) -- [`@` (commercial "at")](qsp-keyword-syntaxems#commercial-at-symbol-) - 5.8.0 -- [`$` (dollar sign)](qsp-keyword-syntaxems#dollar-sign-symbol-) -- [`%` (percent sign)](qsp-keyword-syntaxems#percent-sign-symbol-) - 5.9.0 -- [`*`](qsp-keyword-operacion.md#-multiplication) -- [`*=`](qsp-keyword-operacion.md#-multiplication-assignment) -- [`+`](qsp-keyword-operacion.md#-addition) -- [`+=`](qsp-keyword-operacion.md#-addition-assignment) -- ~~[`+` (unary)](qsp-keyword-operacion.md#--unary-minus)~~ -- [`-`](qsp-keyword-operacion.md#--subtraction) -- [`-=`](qsp-keyword-operacion.md#--subtraction-assignment) -- [`-` (unary)](qsp-keyword-operacion.md#--unary-minus) -- [`/`](qsp-keyword-operacion.md#-division) -- [`/=`](qsp-keyword-operacion.md#-division-assignment) -- [`<`](qsp-keyword-operacion.md#-less-than) -- [`<=`](qsp-keyword-operacion.md#-less-than-or-equal) -- [`<>`](qsp-keyword-operacion.md#-not-equal) -- [`=` (equal)](qsp-keyword-operacion.md#-equal) -- [`=` (assignment)](qsp-keyword-operacion.md#-assignment) -- [`=<`](qsp-keyword-operacion.md#-equal-or-less) -- [`=>`](qsp-keyword-operacion.md#-equal-or-greater) -- [`>`](qsp-keyword-operacion.md#-greater-than) -- [`>=`](qsp-keyword-operacion.md#-greater-than-or-equal) -- [`ACT`](qsp-keyword-operators.md#act) -- ~~[`ADDLIB`](qsp-keyword-operators.md#inclib)~~ -- [`ADDOBJ`](qsp-keyword-operators.md#addobj) -- ~~[`ADDQST`](qsp-keyword-operators.md#inclib)~~ -- [`AND`](qsp-keyword-operacion.md#and) -- [`ARGS`](qsp-keyword-sys-var.md#args) -- [`ARRCOMP`](qsp-keyword-functions.md#arrcomp) -- [`ARRITEM`](qsp-keyword-functions.md#arritem) - 5.8.0 -- [`ARRPACK`](qsp-keyword-functions.md#arrpack) - 5.9.1 -- [`ARRPOS`](qsp-keyword-functions.md#arrpos) -- [`ARRTYPE`](qsp-keyword-functions.md#arrtype) - 5.9.1 -- [`ARRSIZE`](qsp-keyword-functions.md#arrsize) -- [`$BACKIMAGE`](qsp-keyword-sys-var.md#backimage) -- [`BCOLOR`](qsp-keyword-sys-var.md#bcolor) -- [`CLA`](qsp-keyword-operators.md#cla) -- [`CLEAR`](qsp-keyword-operators.md#clear-1) -- [`*CLEAR`](qsp-keyword-operators.md#clear) -- [`CLOSE`](qsp-keyword-operators.md#close) -- [`CLOSE ALL`](qsp-keyword-operators.md#close-all) -- [`CLR`](qsp-keyword-operators.md#clear-1) -- [`*CLR`](qsp-keyword-operators.md#clear) -- [`CLS`](qsp-keyword-operators.md#cls) -- [`CMDCLEAR`](qsp-keyword-operators.md#cmdclear) -- [`CMDCLR`](qsp-keyword-operators.md#cmdclear) -- [`COPYARR`](qsp-keyword-operators.md#copyarr) -- [`$COUNTER`](qsp-keyword-sys-var.md#counter) -- [`COUNTOBJ`](qsp-keyword-functions.md#countobj) -- [`$CURACTS`](qsp-keyword-functions.md#curacts) -- [`$CURLOC`](qsp-keyword-functions.md#curloc) -- [`$CUROBJS`](qsp-keyword-functions.md#curobjs) - 5.9.0 -- [`DEBUG`](qsp-keyword-sys-var.md#debug) -- [`DELACT`](qsp-keyword-operators.md#delact) -- ~~[`DELLIB`](qsp-keyword-operators.md#freelib)~~ -- [`DELOBJ`](qsp-keyword-operators.md#delobj) -- [`$DESC`](qsp-keyword-functions.md#desc) -- [`DISABLESCROLL`](qsp-keyword-sys-var.md#disablescroll) -- ~~[`DISABLESUBEX`](qsp-keyword-sys-var.md#disablesubex)~~ -- [`DYNAMIC`](qsp-keyword-operators.md#dynamic) -- [`DYNEVAL`](qsp-keyword-functions.md#dyneval) -- [`ELSE`](qsp-keyword-operators.md#else) -- [`ELSEIF`](qsp-keyword-operators.md#elseif) -- [`END`](qsp-keyword-syntaxems.md#end) -- [`EXIT`](qsp-keyword-operators.md#exit) -- [`FCOLOR`](qsp-keyword-sys-var.md#fcolor) -- [`$FNAME`](qsp-keyword-sys-var.md#fname) -- [`FREELIB`](qsp-keyword-operators.md#freelib) - 5.8.0 -- [`FSIZE`](qsp-keyword-sys-var.md#fsize) -- [`FUNC`](qsp-keyword-functions.md#func) -- [`$GETOBJ`](qsp-keyword-functions.md#getobj) -- [`GOSUB`](qsp-keyword-operators.md#gosub) -- [`GOTO`](qsp-keyword-operators.md#goto) -- [`GS`](qsp-keyword-operators.md#gosub) -- [`GT`](qsp-keyword-operators.md#goto) -- [`IF`](qsp-keyword-operators.md#if) -- [`IIF`](qsp-keyword-functions.md#iif) -- [`INCLIB`](qsp-keyword-operators.md#inclib) - 5.8.0 -- [`$INPUT`](qsp-keyword-functions.md#input) -- [`INSTR`](qsp-keyword-functions.md#instr) -- [`ISNUM`](qsp-keyword-functions.md#isnum) -- [`ISPLAY`](qsp-keyword-functions.md#isplay) -- [`JUMP`](qsp-keyword-operators.md#jump) -- [`KILLALL`](qsp-keyword-operators.md#killall) -- [`KILLOBJ`](qsp-keyword-operators.md#killobj) -- ~~[`KILLQST`](qsp-keyword-operators.md#freelib)~~ -- [`KILLVAR`](qsp-keyword-operators.md#killvar) -- [`$LCASE`](qsp-keyword-functions.md#lcase) -- [`LCOLOR`](qsp-keyword-sys-var.md#lcolor) -- [`LEN`](qsp-keyword-functions.md#len) -- [`LET`](qsp-keyword-operators.md#let) -- [`LOC`](qsp-keyword-operacion.md#loc) -- [`LOCAL`](qsp-keyword-operators.md#local) - 5.8.0 -- [`LOOP`](qsp-keyword-operators.md#loop) - 5.8.0 -- [`$MAINTXT`](qsp-keyword-functions.md#maintxt) -- [`MAX`](qsp-keyword-functions.md#max) -- [`MENU`](qsp-keyword-operators.md#menu) -- [`$MID`](qsp-keyword-functions.md#mid) -- [`MIN`](qsp-keyword-functions.md#min) -- [`MOD`](qsp-keyword-operacion.md#mod) -- [`MSECSCOUNT`](qsp-keyword-functions.md#msecscount) -- [`MSG`](qsp-keyword-operators.md#msg) -- [`NL`](qsp-keyword-operators.md#nl-1) -- [`*NL`](qsp-keyword-operators.md#nl) -- [`NO`](qsp-keyword-operacion.md#no) -- [`NOSAVE`](qsp-keyword-sys-var.md#nosave) -- [`OBJ`](qsp-keyword-operacion.md#obj) -- [`$ONACTSEL`](qsp-keyword-sys-var.md#onactsel) -- [`$ONGLOAD`](qsp-keyword-sys-var.md#ongload) -- [`$ONGSAVE`](qsp-keyword-sys-var.md#ongsave) -- [`$ONNEWLOC`](qsp-keyword-sys-var.md#onnewloc) -- [`$ONOBJADD`](qsp-keyword-sys-var.md#onobjadd) -- [`$ONOBJDEL`](qsp-keyword-sys-var.md#onobjdel) -- [`$ONOBJSEL`](qsp-keyword-sys-var.md#onobjsel) -- [`OPENGAME`](qsp-keyword-operators.md#opengame) -- [`OPENQST`](qsp-keyword-operators.md#openqst) -- [`OR`](qsp-keyword-operacion.md#or) -- [`P`](qsp-keyword-operators.md#p-1) -- [`*P`](qsp-keyword-operators.md#p) -- [`PL`](qsp-keyword-operators.md#pl-1) -- [`*PL`](qsp-keyword-operators.md#pl) -- [`PLAY`](qsp-keyword-operators.md#play) -- [`$QSPVER`](qsp-keyword-functions.md#qspver) -- [`RAND`](qsp-keyword-functions.md#rand) -- [`REFINT`](qsp-keyword-operators.md#refint) -- [`$REPLACE`](qsp-keyword-functions.md#replace) -- [`RESULT`](qsp-keyword-sys-var.md#result) -- [`RGB`](qsp-keyword-functions.md#rgb) -- [`RND`](qsp-keyword-functions.md#rnd) -- [`SAVEGAME`](qsp-keyword-operators.md#savegame) -- [`SCANSTR`](qsp-keyword-operators.md#scanstr) - 5.9.0 -- [`$SELACT`](qsp-keyword-functions.md#selact) -- [`$SELOBJ`](qsp-keyword-functions.md#selobj) -- [`SET`](qsp-keyword-operators.md#set) -- [`SETTIMER`](qsp-keyword-operators.md#settimer) -- [`SETVAR`](qsp-keyword-operators.md#setvar) - 5.9.1 -- [`SHOWACTS`](qsp-keyword-operators.md#showacts) -- [`SHOWINPUT`](qsp-keyword-operators.md#showinput) -- [`SHOWOBJS`](qsp-keyword-operators.md#showobjs) -- [`SHOWSTAT`](qsp-keyword-operators.md#showstat) -- [`SORTARR`](qsp-keyword-operators.md#sortarr) - 5.9.0 -- [`$STATTXT`](qsp-keyword-functions.md#stattxt) -- [`$STR`](qsp-keyword-functions.md#str) -- [`STRCOMP`](qsp-keyword-functions.md#strcomp) -- [`$STRFIND`](qsp-keyword-functions.md#strfind) -- [`STRPOS`](qsp-keyword-functions.md#strpos) -- [`$TRIM`](qsp-keyword-functions.md#trim) -- [`$UCASE`](qsp-keyword-functions.md#ucase) -- [`UNPACKARR`](qsp-keyword-operators.md#unpackarr) - 5.9.1 -- [`UNSEL`](qsp-keyword-operators.md#unselect) -- [`UNSELECT`](qsp-keyword-operators.md#unselect) -- [`USEHTML`](qsp-keyword-sys-var.md#usehtml) -- [`$USERCOM`](qsp-keyword-sys-var.md#usercom) -- [`$USER_TEXT`](qsp-keyword-functions.md#user_text) -- [`$USRTXT`](qsp-keyword-functions.md#user_text) -- [`VAL`](qsp-keyword-functions.md#val) -- [`VIEW`](qsp-keyword-operators.md#view) -- [`WAIT`](qsp-keyword-operators.md#wait) -- [`XGOTO`](qsp-keyword-operators.md#xgoto) -- [`XGT`](qsp-keyword-operators.md#xgoto) \ No newline at end of file +- [Implicit statement](qsp-keywords-statements#implicit-operator) +- [`!` (comment)](qsp-keywords-statements.md#-comment) +- [`!` (not equal)](qsp-keywords-operators.md#-not-equal-1) +- [`&` (concatenation)](qsp-keywords-operators.md#-concatenation) +- [`&` (command enumeration)](qsp-keywords-syntaxems.md#ampersand-) +- [`:` (labels)](qsp-keywords-syntaxems.md#labels-) +- [`,` (argument separator)](qsp-keywords-syntaxems.md#comma-) +- [`""` (quotes)](qsp-keywords-syntaxems.md#quote-) +- [`''` (apostrophes)](qsp-keywords-syntaxems.md#apostrophe-) +- [`{}` (Curly braces)](qsp-keywords-syntaxems.md#curly-braces-) +- [`()` (round brackets)](qsp-keywords-syntaxems.md#round-brackets-) +- [`[]` (square brackets)](qsp-keywords-syntaxems.md#square-brackets-) +- [`@` (commercial "at")](qsp-keywords-syntaxems#commercial-at-symbol-) - 5.8.0 +- [`$` (dollar sign)](qsp-keywords-syntaxems#dollar-sign-symbol-) +- [`%` (percent sign)](qsp-keywords-syntaxems#percent-sign-symbol-) - 5.9.0 +- [`*`](qsp-keywords-operators.md#-multiplication) +- [`*=`](qsp-keywords-operators.md#-multiplication-assignment) +- [`+`](qsp-keywords-operators.md#-addition) +- [`+=`](qsp-keywords-operators.md#-addition-assignment) +- ~~[`+` (unary)](qsp-keywords-operators.md#--unary-minus)~~ +- [`-`](qsp-keywords-operators.md#--subtraction) +- [`-=`](qsp-keywords-operators.md#--subtraction-assignment) +- [`-` (unary)](qsp-keywords-operators.md#--unary-minus) +- [`/`](qsp-keywords-operators.md#-division) +- [`/=`](qsp-keywords-operators.md#-division-assignment) +- [`<`](qsp-keywords-operators.md#-less-than) +- [`<=`](qsp-keywords-operators.md#-less-than-or-equal) +- [`<>`](qsp-keywords-operators.md#-not-equal) +- [`=` (equal)](qsp-keywords-operators.md#-equal) +- [`=` (assignment)](qsp-keywords-operators.md#-assignment) +- [`=<`](qsp-keywords-operators.md#-equal-or-less) +- [`=>`](qsp-keywords-operators.md#-equal-or-greater) +- [`>`](qsp-keywords-operators.md#-greater-than) +- [`>=`](qsp-keywords-operators.md#-greater-than-or-equal) +- [`ACT`](qsp-keywords-statements.md#act) +- ~~[`ADDLIB`](qsp-keywords-statements.md#inclib)~~ +- [`ADDOBJ`](qsp-keywords-statements.md#addobj) +- ~~[`ADDQST`](qsp-keywords-statements.md#inclib)~~ +- [`AND`](qsp-keywords-operators.md#and) +- [`ARGS`](qsp-keywords-sys-var.md#args) +- [`ARRCOMP`](qsp-keywords-functions.md#arrcomp) +- [`ARRITEM`](qsp-keywords-functions.md#arritem) - 5.8.0 +- [`ARRPACK`](qsp-keywords-functions.md#arrpack) - 5.9.1 +- [`ARRPOS`](qsp-keywords-functions.md#arrpos) +- [`ARRTYPE`](qsp-keywords-functions.md#arrtype) - 5.9.1 +- [`ARRSIZE`](qsp-keywords-functions.md#arrsize) +- [`$BACKIMAGE`](qsp-keywords-sys-var.md#backimage) +- [`BCOLOR`](qsp-keywords-sys-var.md#bcolor) +- [`CLA`](qsp-keywords-statements.md#cla) +- [`CLEAR`](qsp-keywords-statements.md#clear-1) +- [`*CLEAR`](qsp-keywords-statements.md#clear) +- [`CLOSE`](qsp-keywords-statements.md#close) +- [`CLOSE ALL`](qsp-keywords-statements.md#close-all) +- [`CLR`](qsp-keywords-statements.md#clear-1) +- [`*CLR`](qsp-keywords-statements.md#clear) +- [`CLS`](qsp-keywords-statements.md#cls) +- [`CMDCLEAR`](qsp-keywords-statements.md#cmdclear) +- [`CMDCLR`](qsp-keywords-statements.md#cmdclear) +- [`COPYARR`](qsp-keywords-statements.md#copyarr) +- [`$COUNTER`](qsp-keywords-sys-var.md#counter) +- [`COUNTOBJ`](qsp-keywords-functions.md#countobj) +- [`$CURACTS`](qsp-keywords-functions.md#curacts) +- [`$CURLOC`](qsp-keywords-functions.md#curloc) +- [`$CUROBJS`](qsp-keywords-functions.md#curobjs) - 5.9.0 +- [`DEBUG`](qsp-keywords-sys-var.md#counter) +- [`DELACT`](qsp-keywords-statements.md#delact) +- ~~[`DELLIB`](qsp-keywords-statements.md#freelib)~~ +- [`DELOBJ`](qsp-keywords-statements.md#delobj) +- [`$DESC`](qsp-keywords-functions.md#desc) +- [`DISABLESCROLL`](qsp-keywords-sys-var.md#disablescroll) +- ~~[`DISABLESUBEX`](qsp-keywords-sys-var.md#disablesubex)~~ +- [`DYNAMIC`](qsp-keywords-statements.md#dynamic) +- [`DYNEVAL`](qsp-keywords-functions.md#dyneval) +- [`ELSE`](qsp-keywords-statements.md#else) +- [`ELSEIF`](qsp-keywords-statements.md#elseif) +- [`END`](qsp-keywords-syntaxems.md#end) +- [`EXIT`](qsp-keywords-statements.md#exit) +- [`FCOLOR`](qsp-keywords-sys-var.md#fcolor) +- [`$FNAME`](qsp-keywords-sys-var.md#fname) +- [`FREELIB`](qsp-keywords-statements.md#freelib) - 5.8.0 +- [`FSIZE`](qsp-keywords-sys-var.md#fsize) +- [`FUNC`](qsp-keywords-functions.md#func) +- [`$GETOBJ`](qsp-keywords-functions.md#getobj) +- [`GOSUB`](qsp-keywords-statements.md#gosub) +- [`GOTO`](qsp-keywords-statements.md#goto) +- [`GS`](qsp-keywords-statements.md#gosub) +- [`GT`](qsp-keywords-statements.md#goto) +- [`IF`](qsp-keywords-statements.md#if) +- [`IIF`](qsp-keywords-functions.md#iif) +- [`INCLIB`](qsp-keywords-statements.md#inclib) - 5.8.0 +- [`$INPUT`](qsp-keywords-functions.md#input) +- [`INSTR`](qsp-keywords-functions.md#instr) +- [`ISNUM`](qsp-keywords-functions.md#isnum) +- [`ISPLAY`](qsp-keywords-functions.md#isplay) +- [`JUMP`](qsp-keywords-statements.md#jump) +- [`KILLALL`](qsp-keywords-statements.md#killall) +- [`KILLOBJ`](qsp-keywords-statements.md#killobj) +- ~~[`KILLQST`](qsp-keywords-statements.md#freelib)~~ +- [`KILLVAR`](qsp-keywords-statements.md#killvar) +- [`$LCASE`](qsp-keywords-functions.md#lcase) +- [`LCOLOR`](qsp-keywords-sys-var.md#lcolor) +- [`LEN`](qsp-keywords-functions.md#len) +- [`LET`](qsp-keywords-statements.md#let) +- [`LOC`](qsp-keywords-operators.md#loc) +- [`LOCAL`](qsp-keywords-statements.md#local) - 5.8.0 +- [`LOOP`](qsp-keywords-statements.md#loop) - 5.8.0 +- [`$MAINTXT`](qsp-keywords-functions.md#maintxt) +- [`MAX`](qsp-keywords-functions.md#max) +- [`MENU`](qsp-keywords-statements.md#menu) +- [`$MID`](qsp-keywords-functions.md#mid) +- [`MIN`](qsp-keywords-functions.md#min) +- [`MOD`](qsp-keywords-operators.md#mod) +- [`MSECSCOUNT`](qsp-keywords-functions.md#msecscount) +- [`MSG`](qsp-keywords-statements.md#msg) +- [`NL`](qsp-keywords-statements.md#nl-1) +- [`*NL`](qsp-keywords-statements.md#nl) +- [`NO`](qsp-keywords-operators.md#no) +- [`NOSAVE`](qsp-keywords-sys-var.md#nosave) +- [`OBJ`](qsp-keywords-operators.md#obj) +- [`$ONACTSEL`](qsp-keywords-sys-var.md#onactsel) +- [`$ONGLOAD`](qsp-keywords-sys-var.md#ongload) +- [`$ONGSAVE`](qsp-keywords-sys-var.md#ongsave) +- [`$ONNEWLOC`](qsp-keywords-sys-var.md#onnewloc) +- [`$ONOBJADD`](qsp-keywords-sys-var.md#onobjadd) +- [`$ONOBJDEL`](qsp-keywords-sys-var.md#onobjdel) +- [`$ONOBJSEL`](qsp-keywords-sys-var.md#onobjsel) +- [`OPENGAME`](qsp-keywords-statements.md#opengame) +- [`OPENQST`](qsp-keywords-statements.md#openqst) +- [`OR`](qsp-keywords-operators.md#or) +- [`P`](qsp-keywords-statements.md#p-1) +- [`*P`](qsp-keywords-statements.md#p) +- [`PL`](qsp-keywords-statements.md#pl-1) +- [`*PL`](qsp-keywords-statements.md#pl) +- [`PLAY`](qsp-keywords-statements.md#play) +- [`$QSPVER`](qsp-keywords-functions.md#qspver) +- [`RAND`](qsp-keywords-functions.md#rand) +- [`REFINT`](qsp-keywords-statements.md#refint) +- [`$REPLACE`](qsp-keywords-functions.md#replace) +- [`RESULT`](qsp-keywords-sys-var.md#result) +- [`RGB`](qsp-keywords-functions.md#rgb) +- [`RND`](qsp-keywords-functions.md#rnd) +- [`SAVEGAME`](qsp-keywords-statements.md#savegame) +- [`SCANSTR`](qsp-keywords-statements.md#scanstr) - 5.9.0 +- [`$SELACT`](qsp-keywords-functions.md#selact) +- [`$SELOBJ`](qsp-keywords-functions.md#selobj) +- [`SET`](qsp-keywords-statements.md#set) +- [`SETTIMER`](qsp-keywords-statements.md#settimer) +- [`SETVAR`](qsp-keywords-statements.md#setvar) - 5.9.1 +- [`SHOWACTS`](qsp-keywords-statements.md#showacts) +- [`SHOWINPUT`](qsp-keywords-statements.md#showinput) +- [`SHOWOBJS`](qsp-keywords-statements.md#showobjs) +- [`SHOWSTAT`](qsp-keywords-statements.md#showstat) +- [`SORTARR`](qsp-keywords-statements.md#sortarr) - 5.9.0 +- [`$STATTXT`](qsp-keywords-functions.md#stattxt) +- [`$STR`](qsp-keywords-functions.md#str) +- [`STRCOMP`](qsp-keywords-functions.md#strcomp) +- [`$STRFIND`](qsp-keywords-functions.md#strfind) +- [`STRPOS`](qsp-keywords-functions.md#strpos) +- [`$TRIM`](qsp-keywords-functions.md#trim) +- [`$UCASE`](qsp-keywords-functions.md#ucase) +- [`UNPACKARR`](qsp-keywords-statements.md#unpackarr) - 5.9.1 +- [`UNSEL`](qsp-keywords-statements.md#unselect) +- [`UNSELECT`](qsp-keywords-statements.md#unselect) +- [`USEHTML`](qsp-keywords-sys-var.md#usehtml) +- [`$USERCOM`](qsp-keywords-sys-var.md#usercom) +- [`$USER_TEXT`](qsp-keywords-functions.md#user_text) +- [`$USRTXT`](qsp-keywords-functions.md#user_text) +- [`VAL`](qsp-keywords-functions.md#val) +- [`VIEW`](qsp-keywords-statements.md#view) +- [`WAIT`](qsp-keywords-statements.md#wait) +- [`XGOTO`](qsp-keywords-statements.md#xgoto) +- [`XGT`](qsp-keywords-statements.md#xgoto) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-functions.md b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-functions.md similarity index 99% rename from i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-functions.md rename to i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-functions.md index 8487f44..2a27e9e 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-functions.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-functions.md @@ -119,7 +119,7 @@ dyneval("code = 123 + 890") code ``` -See also [operator `DYNAMIC`](qsp-keyword-operators.md#dynamic). +See also [operator `DYNAMIC`](qsp-keywords-statements.md#dynamic). ## `$FUNC` @@ -211,7 +211,7 @@ $name_loc = "summ" *pl func($name_loc, 23) & ! will output 276 to screen ``` -Also see ["Implicit `FUNC` function call"](qsp-keyword-syntaxems#commercial-at-symbol-). +Also see ["Implicit `FUNC` function call"](qsp-keywords-syntaxems#commercial-at-symbol-). ## `$GETOBJ` @@ -561,13 +561,13 @@ act "Eat apple": end ``` -Also see usage examples in the [`$onactsel`](qsp-keyword-sys-var.md#onactsel) section +Also see usage examples in the [`$onactsel`](qsp-keywords-sys-var.md#onactsel) section ## `$SELOBJ` `$SELOBJ` — returns the name of the selected object anywhere in the game. Object selection occurs when clicking (mouse click on object) and is not removed until the `unselect` command is applied. -Usage examples can be found in the [`$onobjsel`](qsp-keyword-sys-var.md#onobjsel) section +Usage examples can be found in the [`$onobjsel`](qsp-keywords-sys-var.md#onobjsel) section ## `$STATTXT` @@ -716,7 +716,7 @@ Example of an action that will output text entered in the input line to the addi act "What did I write?": pl 'I wrote: "<<$user_text>>".' ``` -A more common example is presented in the [`$usercom`](qsp-keyword-sys-var.md#usercom) section. +A more common example is presented in the [`$usercom`](qsp-keywords-sys-var.md#usercom) section. ## ARRCOMP @@ -925,6 +925,7 @@ ARRPOS([#start], [$array_name], [$pattern]) ## ARRTYPE `ARRTYPE` — returns the type of value stored in a variable or specified array cell. The type is returned as one of the following values: + - `''` (empty string) — value not defined (for example, for uninitialized variables); - `'#'` — variable contains number; - `'$'` — variable contains string; @@ -1304,4 +1305,4 @@ apples = val($apples) val('123') & ! we'll see 123 val('') & ! we'll see 0 val('sand') & ! we'll see 0 -``` \ No newline at end of file +``` diff --git a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-operacion.md b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-operators.md similarity index 98% rename from i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-operacion.md rename to i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-operators.md index 6fe3d5a..78a03d8 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-operacion.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-operators.md @@ -2,9 +2,9 @@ sidebar_position: 1 --- -# Operations +# Operators of operations -List of operations for player version 5.8.0 in ascending order of priority: +List of operators for player version 5.8.0 in ascending order of priority: - `OR` - `AND` @@ -235,7 +235,7 @@ Examples: 37+100 & ! returns 137 ``` -When "adding" string values, [concatenation](qsp-keyword-operacion.md#-concatenation) is performed, i.e., "gluing" strings together: +When "adding" string values, [concatenation](qsp-keywords-operators.md#-concatenation) is performed, i.e., "gluing" strings together: ```qsp ! the string "2627" will be output to screen @@ -283,7 +283,7 @@ warrior = warrior + 15 warrior += 15 ``` -It's also possible to perform increment with string values, works like [concatenation](qsp-keyword-operacion.md#-concatenation): +It's also possible to perform increment with string values, works like [concatenation](qsp-keywords-operators.md#-concatenation): ```qsp $text += " (maybe something is written here)" @@ -1111,7 +1111,7 @@ Don't confuse with the command enumeration symbol: ::: :::tip -It's not recommended to use this operation for combining strings, since strings can be combined through [`+`](qsp-keyword-operacion.md#-addition): +It's not recommended to use this operation for combining strings, since strings can be combined through [`+`](qsp-keywords-operators.md#-addition): ```qsp ! the string "2627" will be output to screen @@ -1258,4 +1258,4 @@ Examples: :::note[5.7.0] In older player versions, the operation was bitwise. -::: \ No newline at end of file +::: diff --git a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-operators.md b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-statements.md similarity index 86% rename from i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-operators.md rename to i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-statements.md index 12d436d..c9a3788 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-operators.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-statements.md @@ -2,11 +2,11 @@ sidebar_position: 2 --- -# Operators +# Statements -## Implicit operator +## Implicit statement -The implicit operator is an operator that is not written in QSP code but outputs values to the screen. It is implied wherever an expression without an operator is present in a command. The implicit operator outputs values to the **Main Description Window** in the same way as if you used explicit specification of the `*pl` operator, i.e., it outputs the value and makes a line break. Examples: +The implicit statement is an statement that is not written in QSP code but outputs values to the screen. It is implied wherever an expression without an statement is present in a command. The implicit statement outputs values to the **Main Description Window** in the same way as if you used explicit specification of the `*pl` statement, i.e., it outputs the value and makes a line break. Examples: ```qsp $AAA + '989' @@ -17,7 +17,7 @@ $AAA + '989' $curloc & ! will output the location name to the screen ``` -Unlike the `*pl` operator, the implicit operator does not output an empty line with a line break to the screen if no value is passed to it. This means that if a function returns no value, the implicit operator is simply ignored. Example: +Unlike the `*pl` statement, the implicit statement does not output an empty line with a line break to the screen if no value is passed to it. This means that if a function returns no value, the implicit statement is simply ignored. Example: ```qsp # start @@ -34,7 +34,7 @@ local i = 0 - foo ``` -In this case, the location-function `foo` returns nothing, so we will see two lines with the word "start" on the screen, with no empty lines between them, since the implicit operator in the lines with `$func` at location `start` will be simply ignored. Compare with: +In this case, the location-function `foo` returns nothing, so we will see two lines with the word "start" on the screen, with no empty lines between them, since the implicit statement in the lines with `$func` at location `start` will be simply ignored. Compare with: ```qsp # start @@ -53,15 +53,15 @@ local i=0 ## `!` (comment) -`!` — comment operator. What is in the line after the comment operator and until the end of the line is ignored by the interpreter. The comment operator allows you to "comment out" (disable) an unnecessary operator/function temporarily during game debugging. In addition, writing comments to program code is one of the signs of good programming style. +`!` — comment statement. What is in the line after the comment statement and until the end of the line is ignored by the interpreter. The comment statement allows you to "comment out" (disable) an unnecessary statement/function temporarily during game debugging. In addition, writing comments to program code is one of the signs of good programming style. -It is necessary to clearly understand that this is an operator, so if you are commenting some line of code, then `!` should come after `&`: +It is necessary to clearly understand that this is an statement, so if you are commenting some line of code, then `!` should come after `&`: ```qsp *pl "Hello, world!" & ! comment ``` -Comments can be single-line, i.e., end on the same line where the comment operator is located: +Comments can be single-line, i.e., end on the same line where the comment statement is located: ```qsp ! single-line comment @@ -69,7 +69,7 @@ Comments can be single-line, i.e., end on the same line where the comment operat ``` :::tip[Exception] -The only exception to this rule is writing a comment after a colon in multi-line operators: +The only exception to this rule is writing a comment after a colon in multi-line Statements: ```qsp act "Multi-line action": ! comment @@ -79,7 +79,7 @@ end ::: -Comments can be multi-line. For this, after the comment operator, you need to write quotes, apostrophes, or curly braces. For example: +Comments can be multi-line. For this, after the comment statement, you need to write quotes, apostrophes, or curly braces. For example: ```qsp ! "this is the first line of the comment @@ -120,7 +120,7 @@ where `[$text]` is any text string, number, or expression of any type. If `[$tex ## `*P` -`*P` — text output to the main description window without line break. Text output by any other operator immediately after `*p` will add new text immediately after the current text. General syntax: +`*P` — text output to the main description window without line break. Text output by any other statement immediately after `*p` will add new text immediately after the current text. General syntax: ```qsp *P [$text] @@ -152,7 +152,7 @@ where `[$text]` is any text string, number, or expression of any type. `[$text]` *pl "Text output, then line break." ``` -You can output text in the same way by simply writing the needed expression instead of this operator. For example, the lines: +You can output text in the same way by simply writing the needed expression instead of this statement. For example, the lines: ```qsp *pl $AAA + '989' @@ -181,20 +181,20 @@ will work identically. General syntax in single-line form: ```qsp -ACT [$name], [$path to image file]: [operator] & [operator] & [operator] +ACT [$name], [$path to image file]: [statement] & [statement] & [statement] ``` General syntax in multi-line form: ```qsp ACT [$name], [$path to image file]: - [operator] - [operator] - [operator] + [statement] + [statement] + [statement] END ``` -A new action with name `[$name]` and image located at `[$path to image file]` is added to the actions list in the actions window. When the action is clicked, the specified operators are executed. +A new action with name `[$name]` and image located at `[$path to image file]` is added to the actions list in the actions window. When the action is clicked, the specified Statements are executed. The `[$path to image file]` parameter can be absent, in which case the action is added without an image. @@ -402,7 +402,7 @@ DEL OBJ [$name] DYNAMIC([$code], [argument 0], [argument 1], ... , [argument 18]) ``` -where `[$code]` is regular QSP code written as text. Execution of such code is similar to executing `GOSUB` operator code. Arguments `[argument 0]`, `[argument 1]`, etc. can be used inside `[$code]`, their values are automatically placed in variables `args[0]`, `args[1]`, etc. respectively. After execution, old `args` parameters are restored, then code execution continues from the next command after `dynamic`. +where `[$code]` is regular QSP code written as text. Execution of such code is similar to executing `GOSUB` statement code. Arguments `[argument 0]`, `[argument 1]`, etc. can be used inside `[$code]`, their values are automatically placed in variables `args[0]`, `args[1]`, etc. respectively. After execution, old `args` parameters are restored, then code execution continues from the next command after `dynamic`. Examples: @@ -416,7 +416,7 @@ dynamic " ", 'Text', 'Fork' ``` -The following information is also true for the [`dyneval`](qsp-keyword-functions.md#dyneval) function. +The following information is also true for the [`dyneval`](qsp-keywords-functions.md#dyneval) function. **Important!** If code is specified using apostrophes (`''`) or quotes (`""`), sub-expressions are evaluated in the text: @@ -467,14 +467,14 @@ end ``` :::warning[Attention!!!] -In players version 5.8.0, the `loop` operator appeared. +In players version 5.8.0, the `loop` statement appeared. -The loop body is also considered a separate code block, but the `exit` operator interrupts not only the loop itself, but also the code block in which the loop is located. +The loop body is also considered a separate code block, but the `exit` statement interrupts not only the loop itself, but also the code block in which the loop is located. ::: ## FREELIB -`FREELIB` — removes all locations added with the `inclib` operator. +`FREELIB` — removes all locations added with the `inclib` statement. :::note[5.7.0] In older player versions, the command was called `dellib` and `killqst`. @@ -492,7 +492,7 @@ GOSUB [$location],[argument 0],[argument 1], ... ,[argument 8] where `[$location]` is the name of the location whose code we want to execute without directly going to it. Arguments `[argument 0]`, `[argument 1]`, etc. can be used on this location, their values are automatically placed in variables `args[0]`, `args[1]`, etc. respectively. After processing the location, previous `args` values are restored. Using arguments is not mandatory. -When accessing a location via `gosub`, the base description of the location is added to the current description, base actions are added to current actions, and operators in the "Execute on visit" field are executed, then return to the original line (continuing code execution after `gosub`). +When accessing a location via `gosub`, the base description of the location is added to the current description, base actions are added to current actions, and Statements in the "Execute on visit" field are executed, then return to the original line (continuing code execution after `gosub`). Examples of calling locations via `gosub`: @@ -526,7 +526,7 @@ end - transition ``` -The operator has a short form `gs`: +The statement has a short form `gs`: ```qsp GS [$location], [argument 0], [argument 1], ... , [argument 18] @@ -557,7 +557,7 @@ goto 'house' goto 'street',1,'data' ``` -The operator has a short form `gt`: +The statement has a short form `gt`: ```qsp GT [$location],[argument 0],[argument 1], ... ,[argument 8] @@ -565,7 +565,7 @@ GT [$location],[argument 0],[argument 1], ... ,[argument 8] ## IF -`IF` — the main operator for writing conditional constructions. Constructions written using this operator (let's call them "simple conditions") have two forms: single-line and multi-line, and generally look like this: +`IF` — the main statement for writing conditional constructions. Constructions written using this statement (let's call them "simple conditions") have two forms: single-line and multi-line, and generally look like this: General form: @@ -583,7 +583,7 @@ END In this case, if condition `[#expression]` is true, commands `{command 1}`, `{command 2}`, etc. are executed. -- For **single-line form**, these will be only those commands that are on the same line as the `IF` operator until the end of the line; +- For **single-line form**, these will be only those commands that are on the same line as the `IF` statement until the end of the line; - and for **multi-line form**, these will be those commands that are in subsequent lines after the colon and until the special keyword `END`. Comparison operations, logical operations, and other expressions returning numeric values can serve as conditions. @@ -619,7 +619,7 @@ end :::warning[Pay attention!!!] -In multi-line form, after the colon on the same line where the IF operator is located, there should be no commands, otherwise the player will consider such a conditional operator single-line, and commands in subsequent lines will be executed in any case, regardless of whether the condition turns out to be true or not. Example of such erroneous notation: +In multi-line form, after the colon on the same line where the IF statement is located, there should be no commands, otherwise the player will consider such a conditional statement single-line, and commands in subsequent lines will be executed in any case, regardless of whether the condition turns out to be true or not. Example of such erroneous notation: ```qsp if library = 0: learned_about_party = 0 @@ -628,7 +628,7 @@ if library = 0: learned_about_party = 0 end &! the end keyword is simply ignored ``` -The exception is the comment operator written after the colon: +The exception is the comment statement written after the colon: ```qsp if library = 0: ! if haven't visited library @@ -703,10 +703,10 @@ if abcd=3: k1=34 else k1=25 end ## ELSE -`ELSE` — keyword used together with the `IF` operator, which serves to provide an alternative if the condition is not met. The `ELSE` keyword also has two forms: single-line and multi-line. +`ELSE` — keyword used together with the `IF` statement, which serves to provide an alternative if the condition is not met. The `ELSE` keyword also has two forms: single-line and multi-line. -- Multi-line form of `ELSE` can only be used in multi-line construction of the `IF` operator, -- single-line form can be used both in single-line and multi-line constructions of the `IF` operator. General form: +- Multi-line form of `ELSE` can only be used in multi-line construction of the `IF` statement, +- single-line form can be used both in single-line and multi-line constructions of the `IF` statement. General form: ```qsp ! single-line form @@ -795,10 +795,10 @@ end ## ELSEIF -`ELSEIF` — keyword used together with the `IF` operator and allows defining sequentially-exclusive conditions at one nesting level. Has single-line and multi-line forms. +`ELSEIF` — keyword used together with the `IF` statement and allows defining sequentially-exclusive conditions at one nesting level. Has single-line and multi-line forms. -- Multi-line form can only be used in multi-line constructions with the `IF` operator, -- single-line form can be used in both multi-line and single-line constructions with the `IF` operator. +- Multi-line form can only be used in multi-line constructions with the `IF` statement, +- single-line form can be used in both multi-line and single-line constructions with the `IF` statement. General forms: @@ -835,7 +835,7 @@ This works as follows. If `[#expression 1]` is true, commands `{command set 1}` Features of `ELSEIF` notation: - The variant `ELSE IF` can be used. Works exactly the same. -- If in multi-line `IF` construction after `ELSEIF` operators are on the same line (single-line form), then all subsequent lines are ignored until the next `ELSEIF`, or until `ELSE` or `END`. +- If in multi-line `IF` construction after `ELSEIF` Statements are on the same line (single-line form), then all subsequent lines are ignored until the next `ELSEIF`, or until `ELSE` or `END`. - In `IF` construction with `ELSEIF`, the part with `ELSE` can be either present or absent. Examples: @@ -860,7 +860,7 @@ elseif money mod 10=0 or money mod 10>4 or (money mod 100>10 and money mod 100<2 end ``` -Example of `ELSEIF` notation with operators on the same line: +Example of `ELSEIF` notation with Statements on the same line: ```qsp ! implementing switch/case in QSP @@ -875,7 +875,7 @@ end :::tip[Note:] -For better code readability, it's recommended to use constructions with `elseif` only in multi-line form of the `if` operator. +For better code readability, it's recommended to use constructions with `elseif` only in multi-line form of the `if` statement. ::: @@ -909,7 +909,7 @@ In older player versions, the command was called `addqst` and `addlib`. JUMP [$label] ``` -where `[$label]` is a label below or above in the code (see section ["Labels"](qsp-keyword-syntaxems.md#labels-)). +where `[$label]` is a label below or above in the code (see section ["Labels"](qsp-keywords-syntaxems.md#labels-)). `jump` finds a label only within the current code block, i.e., labels are local. @@ -930,7 +930,7 @@ p 'But this message the user will see' ``` :::note[5.7.0] -Using the `jump` operator in older player versions, you could organize loops: +Using the `jump` statement in older player versions, you could organize loops: ```qsp :loop @@ -959,7 +959,7 @@ if y<9: end ``` -Starting from version 5.8.0, the `loop` operator was introduced for loops. +Starting from version 5.8.0, the `loop` statement was introduced for loops. ::: ## KILLALL @@ -1013,7 +1013,7 @@ KILLVAR [$array name], [element index] where `[$array name]` is the name of the array from which we want to remove an element, and `[element index]` is the number, text index, or multi-dimensional index of the array element we want to remove. Array element numbering starts from 0. -If the element index is not specified, the entire array is cleared. If the operator is called without arguments, all variables and arrays are deleted. +If the element index is not specified, the entire array is cleared. If the statement is called without arguments, all variables and arrays are deleted. Examples: @@ -1043,10 +1043,11 @@ KILLVAR 'a', 1 ## LET -`LET` — deprecated operator for setting variable value. General syntax: +`LET` — deprecated statement for setting variables values. General syntax: ```qsp LET [variable name] = [expression] +LET [variable 1], [variable 2], ... = [value 1], [value 2], ... ``` where `[variable name]` is a valid variable name, `[expression]` is a valid value for this variable. @@ -1064,13 +1065,17 @@ let $text = "text string" let abs = 123 ! set tuple let %tuple = [123, "text string"] +! multiple assignment +let unit_power, $unit_name = 1300, 'DiggerBull' +! unpack the tuple +let $name, age, height = %npc_fields ``` :::tip -This operator is considered deprecated. Use the `set` operator instead, and only in cases when it improves code readability. +This statement is considered deprecated. Use the `set` statement instead, and only in cases when it improves code readability. ```qsp -! assignment can be done without set or let operators: +! assignment can be done without set or let Statements: $text = "text string" ``` @@ -1101,7 +1106,7 @@ local i, j = %map_cell local z, $a = [13, '37'] ``` -Unlike `set` and `let` operators, you can declare a variable but not assign it a value. +Unlike `set` and `let` Statements, you can declare a variable but not assign it a value. ```qsp local tempora @@ -1118,10 +1123,10 @@ local arr You can create your own local variables in the following code blocks: - Locations themselves. -- Code passed to the `DYNAMIC` operator or `DYNEVAL` function as text. +- Code passed to the `DYNAMIC` statement or `DYNEVAL` function as text. - Code executed when clicking on a hyperlink. -- Code of each separate Action ([ACT](qsp-keyword-operators.md#act)). -- Code of each separate Loop ([LOOP](qsp-keyword-operators.md#loop)) +- Code of each separate Action ([ACT](qsp-keywords-statements.md#act)). +- Code of each separate Loop ([LOOP](qsp-keywords-statements.md#loop)) :::warning[**Attention!**] Local variables have one feature that needs to be very clearly understood. The value of a local variable declared in a given code block is translated to all nested or called code blocks from this one. For example, if a local variable is declared on a location, its value is translated to all locations called using `GOSUB` or `FUNC`, to code blocks for `DYNAMIC`/`DYNEVAL`, to loop blocks, and so on. Example: @@ -1237,17 +1242,17 @@ end ## LOOP -`LOOP` — loop operator. Necessary for organizing cyclic calculations. General syntax of single-line form: +`LOOP` — loop statement. Necessary for organizing cyclic calculations. General syntax of single-line form: ```qsp -LOOP {commands before loop start} WHILE [condition] STEP {commands at end of iteration}: {loop body operators} +LOOP {commands before loop start} WHILE [condition] STEP {commands at end of iteration}: {loop body Statements} ``` General syntax of multi-line form: ```qsp LOOP {commands before loop start} WHILE [condition] STEP {commands at end of iteration}: - {loop body operators} + {loop body Statements} END ``` @@ -1256,7 +1261,7 @@ where: - `{commands before loop start}` — these are commands executed before the loop is started. These commands belong to the loop block but don't fall into iterations (passes), i.e., are executed only once. Here you can, for example, declare a loop counter. And here you can write multiple commands, listing them with the `&` (ampersand) separator. - `[condition]` — this is an expression by whose value the condition is checked. Comparison operations and logical operations in any combinations can be used here. If the value of expression `[condition]` equals zero, the loop is interrupted. - `{commands at end of iteration}` — these are commands executed at the end of each loop pass. Commands that don't directly relate to the loop body but nevertheless should be executed on each iteration can be placed here. Here you can, for example, change the loop counter value. And here you can actually write multiple commands, listing them with the `&` (ampersand) separator. -- `{loop body operators}` — these are commands that need to be executed on each pass and are the main ones for the loop. I.e., we make the loop specifically for these commands. +- `{loop body Statements}` — these are commands that need to be executed on each pass and are the main ones for the loop. I.e., we make the loop specifically for these commands. The loop in QSP is a separate code block, which means we can declare local variables inside this code block. This is very convenient because we can declare a local variable for the counter, and this won't affect other variables at the location: @@ -1288,7 +1293,7 @@ end MENU [$array name] ``` -Before using this operator, you need to fill the array based on whose contents the menu items will be formed. Menu items are tuples of three values, sequentially placed in consecutive array cells starting from zero. The contents of each tuple should be approximately like this: +Before using this statement, you need to fill the array based on whose contents the menu items will be formed. Menu items are tuples of three values, sequentially placed in consecutive array cells starting from zero. The contents of each tuple should be approximately like this: ```qsp ["menu item name", "location name", "path to icon file"] @@ -1306,7 +1311,7 @@ Knowing this, we can fill the array to create our menu items: Here the array name (`%stone`) is the menu name, and the tuples are actions for which item names and handler location names for menu item selection are specified. When selecting the "Take stone" item, the location named "takestone" will be called. Similarly for other items. -To display the menu on screen, use the `MENU` operator: +To display the menu on screen, use the `MENU` statement: ```qsp menu '%stone' @@ -1397,7 +1402,7 @@ $stone[2]='Examine stone:lookstone' Here the array name (`$stone`) is the menu name, and the text array values are actions for which names and handler location names for menu item selection are specified. When selecting "Take stone", the location named "takestone" will be processed. Similarly for other items. -To call the menu on screen, use the `menu` operator: +To call the menu on screen, use the `menu` statement: ```qsp menu '$stone' @@ -1513,7 +1518,7 @@ opengame "1.sav" opengame ``` -See also the game state loading event handler location ([$ongload](qsp-keyword-sys-var.md#ongload)). +See also the game state loading event handler location ([$ongload](qsp-keywords-sys-var.md#ongload)). ## OPENQST @@ -1529,7 +1534,7 @@ where [$path] is the path to the game file to be run. Example: openqst "gamespool/cubesgame.qsp" ``` -When using this operator, variables are not deleted, inventory objects are not removed, the additional description and input line are not cleared, and playing files are not stopped. If you need to clear the screen and all variable values, you can write such commands at the beginning of the loaded game file: +When using this statement, variables are not deleted, inventory objects are not removed, the additional description and input line are not cleared, and playing files are not stopped. If you need to clear the screen and all variable values, you can write such commands at the beginning of the loaded game file: ```qsp killall & cls & close all @@ -1537,7 +1542,7 @@ killall & cls & close all ## P -`P` — text output to the additional description window without line break. Text output by any other operator immediately after p will add new text immediately after the current text. General syntax: +`P` — text output to the additional description window without line break. Text output by any other statement immediately after p will add new text immediately after the current text. General syntax: ```qsp P [$text] @@ -1606,7 +1611,7 @@ If the file is already playing, the volume changes without "restarting" it. Mult `REFINT` — forced interface update (including color and font changes assigned using system variables). -By default, interface update occurs 2 times per second (every 500 ms). See also the [`settimer`](#settimer) operator. +By default, interface update occurs 2 times per second (every 500 ms). See also the [`settimer`](#settimer) statement. ## SAVEGAME @@ -1627,7 +1632,7 @@ savegame "1.sav" savegame ``` -See also [game state save event handler location ($ongsave)](qsp-keyword-sys-var.md#ongsave). +See also [game state save event handler location ($ongsave)](qsp-keywords-sys-var.md#ongsave). ## SCANSTR @@ -1660,10 +1665,11 @@ scanstr '$words', $text, '\[(.*?)\]', 1 ## SET -`SET` — operator for setting variable value. General syntax: +`SET` — statement for setting variables values. General syntax: ```qsp SET [variable name] = [expression] +SET [variable 1], [variable 2], ... = [value 1], [value 2], ... ``` where `[variable name]` is a valid variable name, `[expression]` is a valid value for this variable. @@ -1677,10 +1683,14 @@ set $text = "text string" set abs = 123 ! set tuple set %tuple = [27, 184, 'steel'] +! multiple assignment +set unit_power, $unit_name = 1300, 'DiggerBull' +! unpack the tuple +set $name, age, height = %npc_fields ``` :::note[Recommendation:] -Since assignment can be done without the `set` operator, we recommend using this operator only for cases when it improves code readability. For example, with multiple assignment: +Since assignment can be done without the `set` statement, we recommend using this statement only for cases when it improves code readability. For example, with multiple assignment: ```qsp set apples_in_pocket, apples_in_basket, apples_at_Lyosha = 58, 11, 19 @@ -1888,7 +1898,7 @@ where `[$array_name]` is the array where we want to place the unpacked values; ` Tuple element indexing starts from `0`. -The operator allows making tuple slices, including slices of one element. I.e., using this operator we can extract a separate element from a tuple without using a loop. +The statement allows making tuple slices, including slices of one element. I.e., using this statement we can extract a separate element from a tuple without using a loop. Examples: @@ -1909,7 +1919,7 @@ UNPACKARR 'A', %tpl, 3, 1 `UNSELECT` — canceling object selection. Has a short form `unsel`. -When a player clicks on any object, it remains selected. To remove selection from an object, use this operator. Usually it's placed on the object selection handler location. +When a player clicks on any object, it remains selected. To remove selection from an object, use this statement. Usually it's placed on the object selection handler location. ```qsp if $selobj='Orange': @@ -1965,10 +1975,10 @@ wait 5000 ``` :::warning[Caution!] -This operator should be used with caution, since pausing code execution blocks the player's ability to interact with the game. +This statement should be used with caution, since pausing code execution blocks the player's ability to interact with the game. ::: -`WAIT` not only interrupts code execution but also forces the player to output information from the screen buffer. During normal location code execution, all text for operators `*pl`, `*p` `pl`, `nl`, etc. is placed in a special screen buffer, and only after executing all code on the location is it output to the screen. When using `WAIT`, text from the buffer is output immediately at the moment `WAIT` is executed, which is sometimes useful because it allows tracking changes in some values step by step. +`WAIT` not only interrupts code execution but also forces the player to output information from the screen buffer. During normal location code execution, all text for Statements `*pl`, `*p` `pl`, `nl`, etc. is placed in a special screen buffer, and only after executing all code on the location is it output to the screen. When using `WAIT`, text from the buffer is output immediately at the moment `WAIT` is executed, which is sometimes useful because it allows tracking changes in some values step by step. In the example below, numbers will first be written to the screen buffer and only then appear on screen: @@ -2016,8 +2026,8 @@ xgoto 'house' xgoto 'street', 1, 'data' ``` -The operator has a short form `xgt`: +The statement has a short form `xgt`: ```qsp XGT [$location], [argument 0], [argument 1], ... , [argument 18] -``` \ No newline at end of file +``` diff --git a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-syntaxems.md b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-syntaxems.md similarity index 97% rename from i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-syntaxems.md rename to i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-syntaxems.md index babcfac..54d1858 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-syntaxems.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-syntaxems.md @@ -4,7 +4,7 @@ sidebar_position: 5 # Syntaxemes and Special Characters -:::tips[Definition] +:::tip[Definition] In the context of programming, a syntaxeme can be considered as a **minimal unit of syntax** that defines the structure and rules for writing code. @@ -91,7 +91,7 @@ end presence of this text after end is not recommended & *pl "New command" ## Labels `:` -Labels are special syntactic constructs (or rather, less than constructs — syntaxemes) that mark a specified line of code and serve for quick movement to such lines using the [`JUMP`](qsp-keyword-operators.md#jump) operator. General syntax: +Labels are special syntactic constructs (or rather, less than constructs — syntaxemes) that mark a specified line of code and serve for quick movement to such lines using the [`JUMP`](qsp-keywords-statements.md#jump) operator. General syntax: ```qsp :[label name] @@ -164,7 +164,7 @@ Random labels, i.e., labels that have no jump to them via `jump` in the current [command 1] & [command 2] & ... ``` -This symbol should not be confused with the [string concatenation operation](qsp-keyword-operacion.md#-concatenation), and should be used carefully. +This symbol should not be confused with the [string concatenation operation](qsp-keywords-operators.md#-concatenation), and should be used carefully. Examples: @@ -455,7 +455,7 @@ end Implicit location-function calling replaces both `gosub` and `func`, therefore: 1. if your location-function returns a result, implicit calling of such a location will work exactly the same as explicit calling through `func`; -2. if the location-function doesn't return a result, then when using it with the **[implicit operator](qsp-keyword-operators.md#implicit-operator)** it will work like explicit calling through `gosub`. +2. if the location-function doesn't return a result, then when using it with the **[implicit operator](qsp-keywords-statements.md#implicit-operator)** it will work like explicit calling through `gosub`. ::: @@ -502,4 +502,4 @@ number = 123 $var[0], $var[1] = %number *pl '[<<$var[0]>>,<<$var[1]>>]' ! We'll see '[,]' on screen -``` \ No newline at end of file +``` diff --git a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-sys-var.md b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-sys-var.md similarity index 99% rename from i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-sys-var.md rename to i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-sys-var.md index 828830f..b42dd02 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keyword-sys-var.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/language/qsp-keywords/qsp-keywords-sys-var.md @@ -514,4 +514,4 @@ In **qSpider**, recognition is always enabled and is not disabled by changing th $counter[] = 'animation' $counter[] = '' $counter[] = 'time.acts' - ``` \ No newline at end of file + ```