chore: reorganize doc site structure by moving core docs under modules/ and removing category metadata

Restructure the documentation hierarchy to prepare for documenting additional built-in modules. Move all core library documentation from `doc/site/core/` to `doc/site/modules/core/`, rename `modules.markdown` to `modularity.markdown`, remove `^category` metadata lines from all affected pages, update cross-reference links to use relative paths under the new structure, and add a TODO placeholder to the Class class page.
This commit is contained in:
Bob Nystrom
2015-11-08 21:31:22 +00:00
parent 4562b2e497
commit 909c242a03
52 changed files with 771 additions and 178 deletions
+47
View File
@@ -0,0 +1,47 @@
^title System Class
The System class is a grab-bag of functionality exposed by the VM, mostly for
use during development or debugging.
## Static Methods
### System.**clock**
Returns the number of seconds (including fractional seconds) since the program
was started. This is usually used for benchmarking.
### System.**gc**()
Requests that the VM perform an immediate garbage collection to free unused
memory.
### System.**print**()
Prints a single newline to the console.
### System.**print**(object)
Prints [object] to the console followed by a newline. If not already a string,
the object is converted to a string by calling `toString` on it.
:::wren
System.print("I like bananas") //> I like bananas
### System.**printAll**(sequence)
Iterates over [sequence] and prints each element, then prints a single newline
at the end. Each element is converted to a string by calling `toString` on it.
:::wren
System.printAll([1, [2, 3], 4]) //> 1[2, 3]4
### System.**write**(object)
Prints a single value to the console, but does not print a newline character
afterwards. Converts the value to a string by calling `toString` on it.
:::wren
System.write(4 + 5) //> 9
In the above example, the result of `4 + 5` is printed, and then the prompt is
printed on the same line because no newline character was printed afterwards.