From feff6c34b2c35d7620d60b73615fc1f61eb2d8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Przemys=C5=82aw=20Pluta?= Date: Wed, 25 Mar 2020 19:29:25 +0100 Subject: [PATCH] Updated smnp.io (markdown) --- smnp.io.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/smnp.io.md b/smnp.io.md index bb75f4f..8843ada 100644 --- a/smnp.io.md +++ b/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 = "")` \ No newline at end of file +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! +``` \ No newline at end of file