Integer sequence: Difference between revisions
Content added Content deleted
(Integer sequence in XBasic) |
(Jakt) |
||
Line 1,214: | Line 1,214: | ||
This adds support for extended precision (in that it converts non-extended precision arguments to extended precision arguments) and will display integers to ∞ (or at least until the machine is turned off or interrupted or crashes). |
This adds support for extended precision (in that it converts non-extended precision arguments to extended precision arguments) and will display integers to ∞ (or at least until the machine is turned off or interrupted or crashes). |
||
<syntaxhighlight lang="j"> count=: (echo ] >:)@x:^:_</syntaxhighlight> |
<syntaxhighlight lang="j"> count=: (echo ] >:)@x:^:_</syntaxhighlight> |
||
=={{header|Jakt}}== |
|||
Jakt's default integer type is i64. Specifying 1u64 allows it to (theoretically) count to 2^64 - 2 (The range has an implicit exclusive upper bound of 2^64 - 1). |
|||
<syntaxhighlight lang="jakt"> |
|||
fn main() { |
|||
for i in (1u64..) { |
|||
println("{}", i) |
|||
} |
|||
} |
|||
</syntaxhighlight> |
|||
=={{header|Java}}== |
=={{header|Java}}== |