niva Help

Int

This is just an export of niva info > info.md

unary

echo -> Unit

increments the number by 1
1 inc == 2

inc -> Int

1 dec == 0

dec -> Int
toFloat -> Float
toDouble -> Double
toLong -> Long
toString -> String
toChar -> Char

binary

== Int -> Boolean
!= Int -> Boolean
> Int -> Boolean
< Int -> Boolean
<= Int -> Boolean
>= Int -> Boolean
+ Int -> Int
- Int -> Int
* Int -> Int

5 % 2 == 1

% Int -> Int
/ Int -> Int

Creates a range from this value to the specified (included), use ..< for excluded

.. Int -> IntRange

Creates a range from this value to the specified (excluded)

..< Int -> IntRange

keyword

Returns a Range from this value down to the specified to value with the step -1

downTo: Int -> IntRange

1 to: 3 do: [it echo] // 1 2 3

to: Int do: [Int -> Any] -> Unit

1 to: 10 by: 2 do: [it echo] // 1 3 5 7 9

to: Int by: Int do: [Int -> Any] -> Unit

1 until: 4 do: [it echo] // 1 2 3

until: Int do: [Int -> Any] -> Unit

3 downTo: 1 do: [it echo] // 3 2 1

downTo: Int do: [Int -> Any] -> Unit
Last modified: 16 November 2024