X plus plus

From Esolang

Jump to: navigation, search

Contents

[edit] X++

X++ has just a bool and a stream to store values. X++ was invented in April 08 by User:Feuermonster

[edit] Instructions

(* maybe 1 or 0) (? maybe a number from 0 to 7)

  • Xor *
  • bool = bool xor *
  • Or *
  • bool = bool or *
  • And *
  • bool = bool and *
  • Not
  • bool = not bool
  • Addr
  • adds the bool to the stream which is actually a string. stream = stream + (string)bool
  • Addl
  • adds the bool to the stream which is actually a string. stream = (string)bool + stream
  • Outc
  • converts the stream to a number using binary representation. Then it prints the number as a character. (65=a)
  • Outn
  • converts the stream to a number using binary representation. Then it prints the number in decimal.
  • Clear
  • clears the stream
  • Get ?
  • bool = stream[?]
  • Set ?
  • stream[?] = bool
  • In
  • Input. (0 or 1) bool = (bool)input()

[edit] Loops

  • [...] while(bool=0) { ... }
  • (...) while(bool!=0) { ... }
  • {...} while(stream.Length < 8) { ... }


[edit] Examples

Or 1
Addr
And 0
Addr
Or 1
Addr
Outn

This will print 101 as decimal -> 5.

Personal tools