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