From 0ac4cf7f773bb94c532ed9aac620bb4c397c9d93 Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Fri, 14 Jan 2022 23:50:46 +0100 Subject: [PATCH] Create YesNt basics explantation --- Basics.md | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ Hello-World.md | 6 --- 2 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 Basics.md delete mode 100644 Hello-World.md diff --git a/Basics.md b/Basics.md new file mode 100644 index 0000000..a0fc87a --- /dev/null +++ b/Basics.md @@ -0,0 +1,99 @@ +# Hello World + +Creating a hello world program in YesNt is very sample: +``` +cwl Hello World! +``` + +> Note: `cwl` stands for "Console Write Line" and prints everything to the console which comes after it and appends `\n` to it + +# Printing to the console + +There are two statements which can print text to the console +## `cw` (Console Write)\ +Prints everything to the console which comes after it + +### Example +``` +cw Hello +cw World +``` + +### Output: +`HelloWorld` + +## `cwl` (Console Write Line)\ +Prints everything to the console which comes after it and appends `\n` to it + +### Example +``` +cwl Hello +cwl World +``` + +### Output: +``` +Hello +World +``` + + +# Reading from the console +You can read either a whole line or a single char from the console using the following statements: + +## `%cr` (Console Read)\ +Replaces the statement through a single character read from the console + +### Example +``` +cwl %cr +``` + +### Input +`A` + +### Output +`A` + +## `cwl` (Console Write Line)\ +Replaces the statement through a whole line read from the console + +### Example +``` +cwl %crl +``` + +### Input +`Cool Text` + +### Output +`Cool Text` + +# Variables + +## Declaring/Assigning variables + +You can declare/assign variables by using the `<` sign followed by the variable name and an equals sign + +### Example +``` +` sign followed by the variable name + +### Example +``` +myVariable +``` + +### Output +``` +myValue +``` + +# Next steps +These where the bare basics of YesNt. Check out the [next article]() to learn more. \ No newline at end of file diff --git a/Hello-World.md b/Hello-World.md deleted file mode 100644 index aeb8fad..0000000 --- a/Hello-World.md +++ /dev/null @@ -1,6 +0,0 @@ -Creating a hello world program in YesNt is very sample: -``` -cwl Hello World! -``` - -> Note: `cwl` stands for "Console Write Line" and prints everything to the console which comes after it and appends `\n` to it \ No newline at end of file