File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -3337,6 +3337,17 @@ require a more flexible output control, you can do the following:
33373337 the expense module 'sprite';
33383338- Use another engine, because most likely you use INSTEAD for other purposes.
33393339
3340+ ### Substitution $fmt
3341+
3342+ There is a more convenient way to insert formatting and layout into text.
3343+ To do this, you can use the $fmt substitution. For example:
3344+
3345+ p "{$fmt b|Boom!"};
3346+ p "{$fmt tab 50% centre|}{$fmt b|{$fmt nb|Hello, world!}}"
3347+
3348+ As you can see from the example, you can use the formatting and layout functions
3349+ as $fmt templates and place them directly in the text.
3350+
33403351## Constructors and inheritance
33413352
33423353__ Caution!__
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ main3.lua означает, что вы пишите игру на STEAD3!) Др
172172модулях будет рассказано отдельно.
173173
174174 require "fmt" -- некоторые функции форматирования
175- fmt.para = true -- включить режим параграфов (отступы)
175+ fmt.para = true -- включить режим параграфов (отступы)
176176
177177Кроме того, обычно стоит определить обработчики по умолчанию:
178178game.act, game.use, game.inv, о которых также будет рассказано ниже.
@@ -3534,6 +3534,18 @@ room {
35343534 разными шрифтами за счёт модуля 'sprite';
35353535- Использовать другой движок, так как скорее всего вы используете INSTEAD не по назначению.
35363536
3537+ ### Подстановка $fmt
3538+
3539+ Существует более удобный способ вставлять в текст форматирование и оформление.
3540+ Для этого можно воспользоваться подстановкой $fmt. Например:
3541+
3542+ p "{$fmt b|Бум!};
3543+ p "{$fmt tab 50% center|}{$fmt b|{$fmt nb|Привет, мир!}}"
3544+
3545+ Как видно из примера, вы можете использовать функции форматирования и оформления
3546+ в виде подстоновок $fmt и размещать их прямо в тексте.
3547+
3548+
35373549## Конструкторы и наследование
35383550
35393551__ Внимание!__
You can’t perform that action at this time.
0 commit comments