# Fourier Language

## Syntax

### Repeat

x()

Repeat the code within the brackets until the accumulator equals the value of the accumulator at
x. After the open bracket, the accumulator is set to 0. Repeats
*can* be nested.

### If

x{a}{b}

If the result of a equals the value of the accumulator at
x then run code b. After the open curley bracket, the accumulator is set to 0. Ifs
*cannot* be nested.

### Increase

^

Increase the accumulator by one.

### Decrease

v

Decrease the accumulator by one

### Number

n

Set the accumulator to the integer n

### Character out

a

Takes the value of the accumulator as the ASCII code and outputs the character.

### Number out

o

Outputs the value of the accumulator.

### Random

r

Sets the accumulator to a random value in the range 0 to the value of the accumulator.

### Set variable

~z

Creates a variable z and sets it to value of the accumulator

### Call variable

z

Sets the accumulator to the value of variable z. If not previously initialised, the variable is equal to 0.

### Add

+x

Sets the accumulator to the value of the accumulator plus the value of
x.

### Subtract

-x

Sets the accumulator to the value of the accumulator minus the value of
x.

### Multiply

*x

Sets the accumulator to the value of the accumulator multiplied by the value of
x.

### Divide

/x

Sets the accumulator to the value of the accumulator divided by the value of
x.

### Modulo

%x

Sets the accumulator to the remainder of the value of the accumulator divided by the value of
x.

### Input

I

Sets the accumulator to the user input

### Greater than

>x

Sets the accumulator to 1 if the value of the accumulator is greater than the value of
x, 0 if not.

### Less than

<x

Sets the accumulator to 1 if the value of the accumulator is less than the value of
x, 0 if not.

### Equal to

=x

Sets the accumulator to 1 if the value of the accumulator is equal to the value of
x, 0 if not.

## Example

### Code

33~j126(j^a~j)

### Output

"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~