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

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for num_stack_arithmac-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e3ec2aab2cc0a7d852a97c6a406524365baa30666fd19083efa9dffb00f3b87c
MD5 ca04fe6c383255d9fca50b920e25a3e0
BLAKE2b-256 e1884b4cd6d85ddfeeb45827f8b8ddb8694ee7b84a806f947b0b9cc915006530

See more details on using hashes here.

File details

Details for the file num_stack_arithmac-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for num_stack_arithmac-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ac7653765106c9584f961e11a185fc24f5ea75a3d8b15608a0c7b9c9f65368d
MD5 b3fc9c1d9381a67ecda8e2cdbce690cc
BLAKE2b-256 5e72d5afaa17b55b5a54cace817ff4cb9a9a33a1f8cba73e0f69f3d74bfbfd40

See more details on using hashes here.

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