Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

num_stack_arithmac-0.0.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

num_stack_arithmac-0.0.2-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page