Negate

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

Negate is an esolang idea by osminee where every value is either false or true (0 or 1, respectively).

Introduction

In Negate there are following data types:

Type Code example Description
Bit b my_bit: !. Defines a variable with a value of either 0 or 1.
Array a char_a: (!-!!-!-!-!-!-!-!!). Defines an array consisting of bits.

Main syntax

Negate's main logic is about logical operators. For example, when you write !!, it means that you are negating a false value (essentially applying a NOT to the value), so it produces true.

Another example would be to perform a logical conjunction (AND) on two bits: b result: &[!-!!]. Here the value returned to result will be false.

Variables

As shown earlier, Negate does contain variables. You can define a variable like this:

<variable type> <variable name>: <value>.,

where:

  • <variable type> - type of the variable (b for bit, a for array),
  • <variable name> - name of the variable (obvious),
  • <value> - desired value.