27 |
And since these are new development features, they still might be subject to change. |
And since these are new development features, they still might be subject to change. |
28 |
</note> |
</note> |
29 |
|
|
30 |
<h2>64-Bit Integers</h2> |
<h2 id="64bit">64-Bit Integers</h2> |
31 |
<p> |
<p> |
32 |
First of all, integers, i.e. integer number literals (as e.g. <code lang="nksp">4294967295</code>), integer |
First of all, integers, i.e. integer number literals (as e.g. <code lang="nksp">4294967295</code>), integer |
33 |
variables (like <code lang="nksp">declare $foo := 4294967295</code>), or |
variables (like <code lang="nksp">declare $foo := 4294967295</code>), or |
43 |
But let's get on. |
But let's get on. |
44 |
</p> |
</p> |
45 |
|
|
46 |
<h2>Real Numbers</h2> |
<h2 id="real_numbers">Real Numbers</h2> |
47 |
<p> |
<p> |
48 |
You are finally no longer limited to integer math with <a href="01_nksp.html">NKSP</a>. |
You are finally no longer limited to integer math with <a href="01_nksp.html">NKSP</a>. |
49 |
You can now also use floating point arithmetics which will make calculations, |
You can now also use floating point arithmetics which will make calculations, |
51 |
Sounds a bit more interesting, doesn't it?<br> |
Sounds a bit more interesting, doesn't it?<br> |
52 |
</p> |
</p> |
53 |
|
|
54 |
<h3>Variables</h3> |
<h3 id="real_variables">Variables</h3> |
55 |
<p> |
<p> |
56 |
We call those floating point numbers |
We call those floating point numbers |
57 |
<i title="One of the most important classes of numbers in mathematics where each <b>real number</b> represents a continous quantity qualified for reflecting a distance on a line, and hence real numbers are commonly used for the numerical value of measurements of physical quantities like e.g. length, temperature, mass, velocity."> |
<i title="One of the most important classes of numbers in mathematics where each <b>real number</b> represents a continous quantity qualified for reflecting a distance on a line, and hence real numbers are commonly used for the numerical value of measurements of physical quantities like e.g. length, temperature, mass, velocity."> |
114 |
this gap in <i>NKSP</i>. |
this gap in <i>NKSP</i>. |
115 |
</note> |
</note> |
116 |
|
|
117 |
<h3>Type Casting</h3> |
<h3 id="type_casting">Type Casting</h3> |
118 |
<p> |
<p> |
119 |
Like <i>KSP</i> we are (currently) quite strict about your obligation to distinguish |
Like <i>KSP</i> we are (currently) quite strict about your obligation to distinguish |
120 |
clearly between integer numbers and real numbers with <i>NKSP</i>. That means blindly |
clearly between integer numbers and real numbers with <i>NKSP</i>. That means blindly |
350 |
scripting: its guaranteed real-time stability and runtime determinism. |
scripting: its guaranteed real-time stability and runtime determinism. |
351 |
</note> |
</note> |
352 |
|
|
353 |
<h2>Standard Measuring Units</h2> |
<h2 id="units">Standard Measuring Units</h2> |
354 |
<p> |
<p> |
355 |
If you are coming from <i>KSP</i> then you are eventually going to think next |
If you are coming from <i>KSP</i> then you are eventually going to think next |
356 |
"WTF? What is this all about?". But hang with me, no matter how often you |
"WTF? What is this all about?". But hang with me, no matter how often you |
359 |
have a convenient fix for that. |
have a convenient fix for that. |
360 |
<p> |
<p> |
361 |
|
|
362 |
<h3>Unit Literals</h3> |
<h3 id="unit_literals">Unit Literals</h3> |
363 |
<p> |
<p> |
364 |
Let's consider you wanted to pause your script at a certain point for let's say |
Let's consider you wanted to pause your script at a certain point for let's say |
365 |
1 second. Ok, you remember from the back of your head that you need to use the |
1 second. Ok, you remember from the back of your head that you need to use the |
693 |
exactly like this function did before introduction of units feature in <i>NKSP</i>). |
exactly like this function did before introduction of units feature in <i>NKSP</i>). |
694 |
</note> |
</note> |
695 |
|
|
696 |
<h3>Unit Conversion</h3> |
<h3 id="unit_conversion">Unit Conversion</h3> |
697 |
<p> |
<p> |
698 |
Even though you are not allowed to change the unit type of a variable itself |
Even though you are not allowed to change the unit type of a variable itself |
699 |
by assignment at runtime, that does not mean there was no way to get rid of |
by assignment at runtime, that does not mean there was no way to get rid of |
788 |
type for all its elements to retain the parse-time determinism that we were talking about. |
type for all its elements to retain the parse-time determinism that we were talking about. |
789 |
</note> |
</note> |
790 |
|
|
791 |
<h2>Finalness</h2> |
<h2 id="finalness">Finalness</h2> |
792 |
<p> |
<p> |
793 |
Here comes another new core language feature of <i>NKSP</i> that you certainly don't |
Here comes another new core language feature of <i>NKSP</i> that you certainly don't |
794 |
know from <i>KSP</i> (as it does not exist there), and which definitely requires an |
know from <i>KSP</i> (as it does not exist there), and which definitely requires an |