Next: , Previous: , Up: Top  


15 System

k9 comes with a few system functions and measurement commands. The commands allow you to load a script, change the working directory, measure execution times and memory usage, and list defined variables.

System
\l a.k load
\t:n x timing
\u:n
\v     variables
\w     memory
\cd x  cd

15.1 load ⇒ \l a.k

Load a text file of k9 commands. The file name must end in .k.

 \l func.k
\l func.k
 \l func.k7  / will error as not .k
:nyi

15.2 timing ⇒ \t

List time elapsed

 \t ^(_1e7)?_1e8
227

15.3 variables ⇒ \v

List variables

a:1;b:2;c:3
 \v
[v:`a`b`c]

15.4 memory ⇒ \w

List memory usage

 \w
0
 r:(`i$10e6)?10
 \w
2097158

15.5 cd ⇒ \cd x

Change directory (cd) into x

 \cd scripts