Updated smnp.io (markdown)

Bartłomiej Przemysław Pluta
2020-04-02 09:15:09 +02:00
parent 00dbc1c052
commit 5aa90b9343

@@ -1,12 +1,12 @@
# Functions # Functions
## print ## print
``` ```php
print(...items) print(...items)
``` ```
Prints the string representation of given items to standard output. Prints the string representation of given items to standard output.
#### Example #### Example
``` ```php
print("a"); print("a");
print("b"); print("b");
print("c"); print("c");
@@ -16,13 +16,13 @@ print("c");
``` ```
## println ## println
``` ```php
println(...items) 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
``` ```php
println("a"); println("a");
println("b"); println("b");
println("c"); println("c");
@@ -34,13 +34,13 @@ println("c");
``` ```
## read ## read
``` ```php
read(prompt: string = "") 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
``` ```php
name = read("Provide your name: "); name = read("Provide your name: ");
println("Hello, " + name + "!"); println("Hello, " + name + "!");