Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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).

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