erg/doc/EN/API/procs.md
Cai Bingjun 089b02c6ed trifle
2022-09-05 20:39:30 +08:00

39 lines
No EOL
673 B
Markdown

# procedures
## print!
```python
print!(x) -> NoneType
```
Returns x with a newline.
## debug!
```python
debug!(x, type = Info) -> NoneType
```
Debug x with newline (file name, line number, variable name is displayed together). Removed in release mode.
Emoji-capable terminals are prefixed according to type.
* type == Info: 💬
* type == Ok: ✅
* type == Warn: ⚠️
* type == Hint: 💡
## for! i: Iterable T, block: T => NoneType
Traverse the iterator with the action of block.
## while! cond: Bool!, block: () => NoneType
Execute block while cond is True.
## Lineno!() -> Nat
## Filename!() -> Str
## Namespace!() -> Str
## Module!() -> Module