This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 4rpl:commands:asint [2022/04/11 14:15] – [Examples] Removed quotations which would imply a String and enhanced Vertu | 4rpl:commands:asint [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| ===== Description ===== | ===== Description ===== | ||
| - | Converts an item on the stack to an integer, and pushes it back to the stack. | + | Converts |
| If used on a float, will truncate any decimal value. | If used on a float, will truncate any decimal value. | ||
| + | If used on a string, if the string could be numeric (eg. " | ||
| ===== Examples ===== | ===== Examples ===== | ||
| <code 4rpl> | <code 4rpl> | ||
| - | 42.6 asint -> | + | |
| + | Trace (AsInt(42.6)) | ||
| + | Trace (AsInt(" | ||
| + | Trace (AsInt(" | ||
| </ | </ | ||
| + | |||
| + | See also: | ||
| + | * [[AsFloat]] | ||
| + | * [[AsString]] | ||
| + | |||
| < | < | ||