Files use .rex, the command is rex, and the crate, runtime prefixes, docs, editor files and examples all use the new name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
446 B
Rexx
24 lines
446 B
Rexx
const PI = 3.14159
|
|
|
|
func area(r: float): float {
|
|
return PI * r * r
|
|
}
|
|
|
|
func average(a, b: int): float {
|
|
return float(a + b) / 2
|
|
}
|
|
|
|
func main() {
|
|
print("area:", area(2))
|
|
print("avg:", average(3, 4))
|
|
print(10 / 3, 10 % 3, 10.0 / 4)
|
|
print(int(7.9), float(3))
|
|
var x: float = 1
|
|
x *= 2.5
|
|
print(x, x > 2, -x)
|
|
print("whole float:", 2.0 * 3)
|
|
var big = 9223372036854775807
|
|
big += 1
|
|
print("wraps:", big)
|
|
}
|