BizOffers

From Esolang
Jump to navigation Jump to search
BizOffers
Designed by User:SpaceByte
Appeared in 2022
Computational class Turing Complete
Reference implementation [1]
File extension(s) none

BizOffers is an esolang created by User:SpaceByte on July 10th 2022. BizOffers was inspired by C for its syntax and Uyjhmn n! for some of the aspects of the IDE / Interpreter.

Language description

BizOffers is an average esolang, similarly to brainfuck, it features aspects like inputs and outputs via ASCII char codes, but unlike brainfuck it also allows for printing via a string predefined in code, and you can perform more mathematical functions, and with less commands, due to BizOffers being text based. BizOffers is limited to 6 (7, if including the ifnot command), that allow for calculations, input, etc. BizOffers originally operated using ints, but variables were switched to doubles, because Offers would sometimes divide a number by a number it is not divisible by.

IDE/Interpreter

One of the main points of the language is its interpreter. Its interpreter is bundled with its IDE, and the IDE is the only way to run BizOffers code (as of 7/10/22), so there is no other possible way to run pre-written code into the IDE, and it also means you must use offers, and you must adjust for them each time. Offers were an idea User:SpaceByte came up with after User:Yes suggested a language that demands offers on her talk page. Offers are single line commands forced into your code by the IDE (fully at random, with a 1/5 chance of appearing after each line), they do not directly request input or output, but they alter the output of your code, unless you specifically add in code to counter the offers effect on your program. Every command executed by the offer is always possible to revert in some way by the user.

Commands

Command Description
input out [Variable] Requests a key as user input, and sets the value of a variable (which must be initialized, aka set, at least once), to the keys ASCII value.
output [string/char] [string/ascii value or a number defined in code] Output either a string, defined in code, or an ASCII character, with the input being either a variable name (in which, it gets the value of that variable name), or a predefined integer value.
set [int] out [Variable] Set the value of [Variable] to [int], which also initializes the variable, if not done already, variables must be initialized to be used in other lines, or else the IDE will throw an error, and likely crash.
if [int] If int isn't 0, execute the next line. Int can also be used as a reference to a variables value.
ifnot [int] If int is 0, execute the next line. Int can also be used as a reference to a variables value.
goto [int] Skip to a line in your code of the line number [int]. Int can also be used as a reference to a variables value.
operate [numbera] [operation] [numberb] out [variable] Preform a mathematical operation between a number, and a number, also specifying an operation type, it will output the result to [variable]. Operations include, + (Addition), - (Subtraction), x (Multiplication), / (Division), and % (Modulo).

All commands which first word is not a valid command are ignored by the interpreter, allowing use as comments.

Example

Return Character

This program does not account for offers, and if you try to use this code, you may get an offer you need to adjust the code for.

set 0 out a
input out a
output char a

Hello World program

by User:Yes, Does not account for offers.

output string Hello World

Note: I am not sure if strings need qoutes or not.