tulis (print)
Description / Deskripsi
Section titled “Description / Deskripsi”The tulis keyword prints output to the console in SamaLang.
It is equivalent to print in standard Lua.
Keyword tulis digunakan untuk mencetak output ke konsol dalam SamaLang.
Setara dengan print di Lua.
Usage / Penggunaan
Section titled “Usage / Penggunaan”tulis(value)Examples
Section titled “Examples”Print String
Section titled “Print String”tulis("Halo, Dunia!")-- Output: Halo, Dunia!Print Number
Section titled “Print Number”ada umur = 25tulis(umur)-- Output: 25Print Multiple Values
Section titled “Print Multiple Values”ada nama = "SamaLang"ada versi = 2.0tulis(nama, versi)-- Output: SamaLang 2.0Print with Concatenation
Section titled “Print with Concatenation”ada nama = "Ahmad"tulis("Halo, " .. nama .. "!")-- Output: Halo, Ahmad!Print Boolean
Section titled “Print Boolean”ada aktif = truetulis(aktif)-- Output: truePrint Table Length
Section titled “Print Table Length”ada buah = {"apel", "mangga", "jeruk"}tulis("Jumlah buah: " .. tostring(#buah))-- Output: Jumlah buah: 3