Create YesNt basics explantation

Stone_Red
2022-01-14 23:50:46 +01:00
parent 7361f14aff
commit 0ac4cf7f77
2 changed files with 99 additions and 6 deletions
+99
@@ -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
```
<myVariable = myValue
```
## Reading variables
You can get the value of a variable by using the `>` sign followed by the variable name
### Example
```
<myVariable = myValue
cwl >myVariable
```
### Output
```
myValue
```
# Next steps
These where the bare basics of YesNt. Check out the [next article]() to learn more.
-6
@@ -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