Updated smnp.io (markdown)
12
smnp.io.md
12
smnp.io.md
@@ -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 + "!");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user