mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-16 00:20:41 +00:00
39 lines
686 B
Markdown
39 lines
686 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
|