extra(3lua): init man pages
This commit is contained in:
parent
ed811fd099
commit
416585d084
3 changed files with 68 additions and 0 deletions
19
man/extra/extra.3lua.scd
Normal file
19
man/extra/extra.3lua.scd
Normal file
|
@ -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)
|
30
man/extra/printfmt.3lua.scd
Normal file
30
man/extra/printfmt.3lua.scd
Normal file
|
@ -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)
|
19
man/extra/sleep.3lua.scd
Normal file
19
man/extra/sleep.3lua.scd
Normal file
|
@ -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)
|
Loading…
Add table
Add a link
Reference in a new issue