Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daelsepara/zil-numbers
Demonstration of how to get number from user input. Can convert numbers up to base 36 (digits 0-9 and characters A-Z).
https://github.com/daelsepara/zil-numbers
z-machine zil
Last synced: 5 days ago
JSON representation
Demonstration of how to get number from user input. Can convert numbers up to base 36 (digits 0-9 and characters A-Z).
- Host: GitHub
- URL: https://github.com/daelsepara/zil-numbers
- Owner: daelsepara
- License: mit
- Created: 2020-07-07T17:36:41.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-07T17:59:18.000Z (over 4 years ago)
- Last Synced: 2024-11-07T20:13:25.487Z (about 2 months ago)
- Topics: z-machine, zil
- Language: ZIL
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zil-numbers
Demonstrates how to get numbers from user input using **READLINE**. It can also be used with different bases, e.g. base 2, 10, 16, etc, up to base 36 (using characters a-z for numbers greater than 10)
## POWER (BASE EXP)
- Computes **BASE**^**EXP** (or **BASE** to **EXP**-th power)
- Can only handle positve values for **EXP** and **0**.
- Recursive## CONVERT-TO-NUMBER (N "OPT" BASE)
- Converts the N-th word of the user input to integer. To be used after calling **READLINE**
- If **BASE** is not provided, it defaults to 10.
- actual conversion is done by **GET-DIGIT** and **TO-INTEGER** routines