Define a primitive data type: Difference between revisions

Content added Content deleted
imported>Arakov
m (→‎{{header|Wren}}: Changed to Wren S/H)
Line 2,998: Line 2,998:


The following carries out this procedure for a few basic operations and shows examples of their usage including throwing an out of bounds error on the last one.
The following carries out this procedure for a few basic operations and shows examples of their usage including throwing an out of bounds error on the last one.
<syntaxhighlight lang="ecmascript">class TinyInt {
<syntaxhighlight lang="wren">class TinyInt {
construct new(n) {
construct new(n) {
if (!(n is Num && n.isInteger && n >= 1 && n <= 10)) {
if (!(n is Num && n.isInteger && n >= 1 && n <= 10)) {