if(x > 0):
print("positive")
elif(x == 0):
print("zero")
else:
print("negative")
let i = 0
while(i < 10):
print(i)
i = i + 1
Exits the nearest enclosing loop.
while(true):
if(done):
| Operator | Meaning |
|---|---|
==, != |
equality |
<, >, <=, >= |
comparison |
+, -, *, /, % |
arithmetic |
&&, || |
logical and / or |
! |
logical not |
Raw C++ expressions can be embedded with cpp(...):
let raw = cpp("std::rand() % 100")