The Num Stack Arithmac programming language.
Project description
Num Stack Arithmac
Install via:
pip install num-stack-arithmac
Pre-execution
Input is given by specifying the start number.
Instructions
Here are the different instructions:
+
increments the number.
-
decrements the number.
%
performs reduction modulo 2 on the number.
^
squares the number.
r
takes the square root of the number.
p
prints the decimal representation of the number.
q
prints the character with the codepoint of the number.
b
prints the binary representation of the number.
x
prints the hexadecimal representation of the number.
o
prints the boolean representation of the number.
<
starts a comment. Comments are ignored by the compiler.
>
ends a comment. Comments are ignored by the compiler.
s
halts the programme.
All other characters are no-ops. If you use \\
or .
in your programme, the compiler will incorrectly think you are specifying the file path if you are typing in raw code. You can also access a graphical editor by typing in g
.
Example
Here is an example programme that checks whether a number is even or odd (the number is given by the starting value):
%+%o
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file num_stack_arithmac-0.0.2.tar.gz
.
File metadata
- Download URL: num_stack_arithmac-0.0.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3ec2aab2cc0a7d852a97c6a406524365baa30666fd19083efa9dffb00f3b87c |
|
MD5 | ca04fe6c383255d9fca50b920e25a3e0 |
|
BLAKE2b-256 | e1884b4cd6d85ddfeeb45827f8b8ddb8694ee7b84a806f947b0b9cc915006530 |
File details
Details for the file num_stack_arithmac-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: num_stack_arithmac-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ac7653765106c9584f961e11a185fc24f5ea75a3d8b15608a0c7b9c9f65368d |
|
MD5 | b3fc9c1d9381a67ecda8e2cdbce690cc |
|
BLAKE2b-256 | 5e72d5afaa17b55b5a54cace817ff4cb9a9a33a1f8cba73e0f69f3d74bfbfd40 |