Updated smnp.io (markdown)
21
smnp.io.md
21
smnp.io.md
@@ -1,8 +1,11 @@
|
|||||||
# Functions
|
# Functions
|
||||||
## `print(...items)`
|
## print
|
||||||
|
```
|
||||||
|
print(...items)
|
||||||
|
```
|
||||||
Prints the string representation of given items to standard output.
|
Prints the string representation of given items to standard output.
|
||||||
|
|
||||||
### Example
|
#### Example
|
||||||
```
|
```
|
||||||
print("a");
|
print("a");
|
||||||
print("b");
|
print("b");
|
||||||
@@ -12,10 +15,13 @@ print("c");
|
|||||||
# abc
|
# abc
|
||||||
```
|
```
|
||||||
|
|
||||||
## `println(...items)`
|
## println
|
||||||
|
```
|
||||||
|
println(...items)
|
||||||
|
```
|
||||||
The same as `print(...)` however ends each line new line character (`\n`).
|
The same as `print(...)` however ends each line new line character (`\n`).
|
||||||
|
|
||||||
### Example
|
#### Example
|
||||||
```
|
```
|
||||||
println("a");
|
println("a");
|
||||||
println("b");
|
println("b");
|
||||||
@@ -27,10 +33,13 @@ println("c");
|
|||||||
# c
|
# c
|
||||||
```
|
```
|
||||||
|
|
||||||
## `read(prompt: string = "")`
|
## read
|
||||||
|
```
|
||||||
|
read(prompt: string = "")
|
||||||
|
```
|
||||||
Reads an input from user as a string. The optional parameter is the prompt displayed on the standard output.
|
Reads an input from user as a string. The optional parameter is the prompt displayed on the standard output.
|
||||||
|
|
||||||
### Example
|
#### Example
|
||||||
```
|
```
|
||||||
name = read("Provide your name: ");
|
name = read("Provide your name: ");
|
||||||
println("Hello, " + name + "!");
|
println("Hello, " + name + "!");
|
||||||
|
|||||||
Reference in New Issue
Block a user