Literals/Integer: Difference between revisions

Content deleted Content added
Eriksiers (talk | contribs)
added Befunge
Line 581:
=={{header|Ursala}}==
 
Natural numbers (i.e., unsigned integers) of any size are supported. Only decimal integer literals are recognized by the compiler, as in a declaration such as the following.
(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 integers are also recognized and are considered a separate type from natural numbers, but non-negative integers and natural numbers have compatible binary representations.
Signed rational numbers of unlimited precision are also a primitive type
<lang Ursala>z = -35</lang>
and can be expressed
Signed rational numbers of unlimited precision are alsoyet aanother primitive type and can be expressed
in conventional decimal form.
<lang Ursala>m = -2/3</lang>
The forward slash in a rational literal is part of the syntax and not a division operator. Finally, a signed or unsigned integer with a trailing underscore, like this
The forward slash in a rational
<lang Usala>t = 4534934521_</lang>
literal is only syntactic sugar and not interpreted as division,
is used for numbers stored in binary converted decimal format, also with unlimited precision, which may perform better in applications involving very large decimal numbers.
nor is the minus sign a general purpose negation operator.
(A rational is stored as triple with a distinct sign, numerator, and
denominator.)