diff --git a/man/extra/extra.3lua.scd b/man/extra/extra.3lua.scd new file mode 100644 index 0000000..76b73e1 --- /dev/null +++ b/man/extra/extra.3lua.scd @@ -0,0 +1,19 @@ +EXTRA(3lua) "3lua" "Callisto manual pages" + +# NAME +*extra* - extra utility library + +# SYNOPSIS +.Syn + +# DESCRIPTION +The *extra* library provides utility routines +not pertaining to any other library. + +Using the *csto* interpreter, these routines will be loaded into +the global environment, rather than its own library table; +therefore, these manuals will refer to *extra*'s routines +by their individual names (without the library prefix). + +# SEE ALSO +callisto(3lua) diff --git a/man/extra/printfmt.3lua.scd b/man/extra/printfmt.3lua.scd new file mode 100644 index 0000000..b15ff2c --- /dev/null +++ b/man/extra/printfmt.3lua.scd @@ -0,0 +1,30 @@ +PRINTFMT(3lua) "3lua" "Callisto manual pages" + +# NAME +*printfmt* - write formatted data to standard output + +# SYNOPSIS +*printfmt*(_fstring_: *string*, _..._) + +# DESCRIPTION +*printfmt* writes formatted data +specified by the format string _fstring_ to standard output, +behaving similarly to the built in Lua function *string.format*. + +It is somewhat equivalent to: + + io.stdout:write(string.format(_fstring_, _..._), '\n') + +# EXAMPLES +Output the values of a list in CSV format: + +``` +list = {2, 4, 8, 16} +printfmt("%d,%d,%d,%d", list[1], list[2], list[3], list[4]) +``` + +Without using *printfmt* or other string formatting functions, +this example would require extensive concatenation. + +# SEE ALSO +callisto(3lua), extra(3lua) diff --git a/man/extra/sleep.3lua.scd b/man/extra/sleep.3lua.scd new file mode 100644 index 0000000..f7a0f3c --- /dev/null +++ b/man/extra/sleep.3lua.scd @@ -0,0 +1,19 @@ +SLEEP(3lua) "3lua" "Callisto manual pages" + +# NAME +*sleep* - suspend execution + +# SYNOPSIS +*sleep*(_n_: *number*) + +# DESCRIPTION +*sleep* suspends execution of the current script until +_n_ seconds have passed. + +# EXAMPLES +Sleep for 5 minutes: + + sleep(5 \* 60) + +# SEE ALSO +callisto(3lua), extra(3lua)