WaidWmy
This is a esoteric programming language made by User:AlmostGalactic
How to use
Printing
Printing Waidwmy is pretty simple
I AM GOING TO SAY "Hello, World!" BECAUSE I CAN
this just prints out "Hello, World!"
Variables
Programming in WaidWmy would be really difficult without variables
if you want to make a variable just do this
LETS MAKE A VARIABLE NAMED (Variable Name) WITH THE VALUE OF (Value)
And to use it just put its name
LETS MAKE A VARIABLE NAMED Name WITH THE VALUE OF "User Name" I AM GOING TO SAY Name BECAUSE I CAN
this prints out the variable name which is "User Name"
Selecting Variables
Another thing you can do with your variables is select them. This allows you do do stuff with your variables
Here is how you select a variable
LETS SELECT THE VARIABLE CALLED (Variable Here)
Selecting a variable allows you to modify it. One example of modifying a variable is changing its value
LETS MAKE A VARIABLE NAMED NAME WITH THE VALUE OF "Default Name" LETS SELECT THE VARIABLE CALLED NAME SET THE SELECTED VARIABLES VALUE TO "Other Default Name"
We selected the variable Name and changed its value to "Other Default Name" using
SET THE SELECTED VARIABLES VALUE TO (Value)
Math
Now that we have variables covered we can do math!
In order to do math we need a selected variable
LETS MAKE A VARIABLE NAMED MATH WITH THE VALUE OF 0 LETS SELECT THE VARIABLE CALLED MATH
Now that we have one we can do math. You can do math like this
CAN WE ADD (Number) TO THE SELECTED VARIABLE CAN WE SUBTRACT (Number) TO THE SELECTED VARIABLE CAN WE MULTIPLY (Number) TO THE SELECTED VARIABLE CAN WE DIVIDE (Number) TO THE SELECTED VARIABLE
This replaces the selected variables value with the returned value
There is no current way to use modulus
Other Stuff
Concatenation
You can concat values to the selected variables value
Lets get a selected variable
LETS MAKE A VARIABLE NAMED Concat WITH THE VALUE OF "Test 1" LETS SELECT THE VARIABLE CALLED Concat
Now to concat you need to use JOIN
Heres how
JOIN (value) (BEFORE/AFTER) THE SELECTED VARIABLES VALUE
If you use
JOIN (value) BEFORE THE SELECTED VARIABLES VALUE
it will concat (value) before the value of the selected variable, vice versa
Once that is done it will replace the selected variables value with the joined value
User Input
You can get the user's input by using
GET THE USERS INPUT
This will give the user a prompt and store the input into a variable called USERINPUT
Halting
If you want to stop the program forcefully you can use halt
PLEASE HALT THIS PROGRAM
Labels
Since WaidWmy doesn't have functions you can use labels.
Here is how you make one
MAY I TALK ABOUT (Label Name) HERE
That creates the label but if you want to go to it you have to do
WANT TO TALK ABOUT (Label Name)
Here is an example of a really long hello world program using Labels
I AM GOING TO SAY "HELLO" BECAUSE I CAN WANT TO TALK ABOUT WORLD PLEASE HALT THIS PROGRAM MAY I TALK ABOUT WORLD HERE I AM GOING TO SAY "WORLD!" BECAUSE I CAN PLEASE HALT THIS PROGRAM
This outputs
HELLO WORLD
If Statement
Since you can't make a lot of programs without if's it is now here.
Here is how you make an if
IF (value1) IS (GREATER THAN / EQUAL TO / LESS THAN) (value2) THEN LETS TALK ABOUT (label to go to)
Here is a simple way to use if statements
GET THE USERS INPUT IF USERINPUT IS EQUAL TO 1 THEN LETS TALK ABOUT Forever I AM GOING TO SAY 0 BECAUSE I CAN PLEASE HALT THIS PROGRAM MAY I TALK ABOUT Forever HERE I AM GOING TO SAY 1 BECAUSE I CAN WANT TO TALK ABOUT Forever
If you have experience with esolangs you may know this is a truth machine
Waiting
If you want to wait a number of seconds before continuing your program you can use this
LETS WAIT (seconds) SECONDS SINCE I HAVE TIME
That waits the specified number of seconds before continuing your program again
Clearing the Console
Just clears the console
CLEAR THE CONSOLE PLEASE
Programs
Calculator Program
I AM GOING TO SAY "ENTER A NUMBER" BECAUSE I CAN GET THE USERS INPUT LETS MAKE A VARIABLE NAMED FIRSTNUM WITH THE VALUE OF USERINPUT I AM GOING TO SAY "ENTER ANOTHER NUMBER" BECAUSE I CAN GET THE USERS INPUT LETS MAKE A VARIABLE NAMED SECONDNUM WITH THE VALUE OF USERINPUT I AM GOING TO SAY "ENTER IN AN OPERATOR" BECAUSE I CAN GET THE USERS INPUT LETS MAKE A VARIABLE NAMED OPERATOR WITH THE VALUE OF USERINPUT IF OPERATOR IS EQUAL TO "+" THEN LETS TALK ABOUT ADD IF OPERATOR IS EQUAL TO "-" THEN LETS TALK ABOUT SUB IF OPERATOR IS EQUAL TO "*" THEN LETS TALK ABOUT MUL IF OPERATOR IS EQUAL TO "/" THEN LETS TALK ABOUT DIV I AM GOING TO SAY "INVALID OPERATOR" BECAUSE I CAN PLEASE HALT THIS PROGRAM MAY I TALK ABOUT ADD HERE LETS MAKE A VARIABLE NAMED RESULT WITH THE VALUE OF FIRSTNUM LETS SELECT THE VARIABLE CALLED RESULT CAN WE ADD SECONDNUM TO THE SELECTED VARIABLE I AM GOING TO SAY RESULT BECAUSE I CAN PLEASE HALT THIS PROGRAM MAY I TALK ABOUT SUB HERE LETS MAKE A VARIABLE NAMED RESULT WITH THE VALUE OF FIRSTNUM LETS SELECT THE VARIABLE CALLED RESULT CAN WE SUBTRACT SECONDNUM TO THE SELECTED VARIABLE I AM GOING TO SAY RESULT BECAUSE I CAN PLEASE HALT THIS PROGRAM MAY I TALK ABOUT MUL HERE LETS MAKE A VARIABLE NAMED RESULT WITH THE VALUE OF FIRSTNUM LETS SELECT THE VARIABLE CALLED RESULT CAN WE MULTIPLY SECONDNUM TO THE SELECTED VARIABLE I AM GOING TO SAY RESULT BECAUSE I CAN PLEASE HALT THIS PROGRAM MAY I TALK ABOUT DIV HERE LETS MAKE A VARIABLE NAMED RESULT WITH THE VALUE OF FIRSTNUM LETS SELECT THE VARIABLE CALLED RESULT CAN WE DIVIDE SECONDNUM TO THE SELECTED VARIABLE I AM GOING TO SAY RESULT BECAUSE I CAN PLEASE HALT THIS PROGRAM
Truth Machine
Asks for input. Outputs 1 forever if input is 1 else outputs 0 once
I AM GOING TO SAY "1 or 0" BECAUSE I CAN GET THE USERS INPUT IF USERINPUT IS EQUAL TO 1 THEN LETS TALK ABOUT TRUTHMACHINE I AM GOING TO SAY 0 BECAUSE I CAN PLEASE HALT THIS PROGRAM MAY I TALK ABOUT TRUTHMACHINE HERE I AM GOING TO SAY 1 BECAUSE I CAN WANT TO TALK ABOUT TRUTHMACHINE