Literals/Integer: Difference between revisions

Content deleted Content added
m →‎{{header|AutoHotkey}}: Minor indentation and casing edit
added Ursala
Line 435: Line 435:
let "baseXX = 20#1g7"
let "baseXX = 20#1g7"
</pre>
</pre>

=={{header|Ursala}}==

Natural numbers (i.e., unsigned integers) of any size are supported,
(among other numeric
types). Only decimal integer literals are recognized by the compiler,
as in a declaration such as the following.
<lang Ursala>n = 724</lang>
Signed rational numbers of unlimited precision are also a primitive type
and can be expressed
in conventional decimal form.
<lang Ursala>m = -2/3</lang>
The forward slash in a rational
literal is only syntactic sugar and not interpreted as division,
nor is the minus sign a general purpose negation operator.
(A rational is stored as triple with a distinct sign, numerator, and
denominator.)