Update docs

This commit is contained in:
2026-01-18 14:28:21 +11:00
parent 1410b025c5
commit eb48507091

View File

@@ -125,6 +125,14 @@ while number < 10 {
</ul>
</div>
</div>
<div id="inline_ground">
<h2>Inline Ground</h2>
<p>Since Solstice is built atop Ground, you can write Ground code inside Solstice code, usually to wrap a Ground function for the Solstice standard library.</p>
<p>Inline Ground is not vetted by the type checker. <strong>Be careful when modifying existing variables with inline ground!</strong> The type checker is not aware of any values created inside inline Ground.</p>
<p>If you would like the Solstice type checker to be aware of values created by Ground, initialise a variable with a blank of whatever type is made by Ground.</p>
<p>Variable names are the same inside inline Ground as they are in Solstice. Read Ground's syntax guide for an understanding on how it should work <a href="https://chookspace.com/ground/cground/src/branch/master/docs/syntax.md">here</a>.</p>
<pre class="code"><code>ground {<br> set &x 5<br> println $x<br>}</code></pre>
</div>
<div id="builtins">
<h2>Built In Functions</h2>
<div id="input_string_msg__string">
@@ -132,6 +140,16 @@ while number &lt; 10 {
<p>Gets user input from the console until the next line. The msg is used as a prompt for the user. Returns inputted characters from the console.</p>
<pre class="code"><code>guess = input("What is the password? ")<br>if guess == "password123" {<br> puts "Good job!"<br>}</code></pre>
</div>
<div id="print_string_msg__string">
<h3>print(string msg) string</h3>
<p>Prints a string to the console.</p>
<pre class="code"><code>print("Hello, World!")</code></pre>
</div>
<div id="println_string_msg__string">
<h3>println(string msg) string</h3>
<p>Prints a string to the console. Appends a new line afterwards.</p>
<pre class="code"><code>println("Hello, World!")</code></pre>
</div>
</div>
</div>
</div>