e
This commit is contained in:
@@ -14,7 +14,9 @@
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li><strong><a href="#core_concepts">Core Concepts</a></strong></li>
|
||||
<li><strong><a href="#types">Types</a></strong></li>
|
||||
<li><strong><a href="#type_system">Type System</a></strong></li>
|
||||
<li><a href="#value_types">Value Types</a></li>
|
||||
<li><a href="#type_checker">Type Checker</a></li>
|
||||
<li><strong><a href="#builtins">Built In Functions</a></strong></li>
|
||||
<li><a href="#input_string_msg__string">input(string msg) string</a></li>
|
||||
</ul>
|
||||
@@ -88,17 +90,30 @@ while number < 10 {
|
||||
<h3>That's it!</h3>
|
||||
<p>You now know everything you need to know about Solstice to start programming! You can continue reading for more information.</p>
|
||||
</div>
|
||||
<div id="types">
|
||||
<h2>Types</h2>
|
||||
<div id="type_system">
|
||||
<h2>Type System</h2>
|
||||
<p>Solstice's type system is currently a work in progress, but what is so far implemented will be detailed.</p>
|
||||
<h3>Value Types</h3>
|
||||
<ul>
|
||||
<li><code>int</code>: Signed 64 bit integer</li>
|
||||
<li><code>double</code>: Double prescision floating point number</li>
|
||||
<li><code>string</code>: Character array</li>
|
||||
<li><code>char</code>: A single character</li>
|
||||
<li><code>bool</code>: Either true or false</li>
|
||||
</ul>
|
||||
<div id="value_types">
|
||||
<h3>Value Types</h3>
|
||||
<ul>
|
||||
<li><code>int</code>: Signed 64 bit integer</li>
|
||||
<li><code>double</code>: Double prescision floating point number</li>
|
||||
<li><code>string</code>: Character array</li>
|
||||
<li><code>char</code>: A single character</li>
|
||||
<li><code>bool</code>: Either true or false</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="type_checker">
|
||||
<h3>Type Checker</h3>
|
||||
<p>Solstice statically checks types at compile time to ensure your data is used as intended. These are the details of the type checker.</p>
|
||||
<ul>
|
||||
<li>Types of variables when setting with <code>=</code> are autoinferred and cannot be provided by the user. All variables must have a value.</li>
|
||||
<li>When setting a variable with <code>=</code>, it's type must not mutate in any way.</li>
|
||||
<li>Functions must have types annotated. There is no "any" type.</li>
|
||||
<li>When using operators, integers are able to promote to doubles where required. No other types can automatically convert.</li>
|
||||
<li>All equality operators require the same type on both sides of the equality.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="builtins">
|
||||
<h2>Built In Functions</h2>
|
||||
|
||||
Reference in New Issue
Block a user