Compare commits
2 Commits
5383e3fdf4
...
eb48507091
| Author | SHA1 | Date | |
|---|---|---|---|
| eb48507091 | |||
| 1410b025c5 |
@@ -125,6 +125,14 @@ while number < 10 {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<div id="builtins">
|
||||||
<h2>Built In Functions</h2>
|
<h2>Built In Functions</h2>
|
||||||
<div id="input_string_msg__string">
|
<div id="input_string_msg__string">
|
||||||
@@ -132,6 +140,16 @@ while number < 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>
|
<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>
|
<pre class="code"><code>guess = input("What is the password? ")<br>if guess == "password123" {<br> puts "Good job!"<br>}</code></pre>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ then
|
|||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v gmake 2>&1 >/dev/null
|
if ! command -v make 2>&1 >/dev/null
|
||||||
then
|
then
|
||||||
echo "gmake is not installed on your system. Install it with your package manager (or on macOS use xcode-select)"
|
echo "make is not installed on your system. Install it with your package manager (or on macOS use xcode-select)"
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user