1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
Leah Lundqvist
2020-12-08 17:49:20 +01:00
committed by GitHub
parent a2ec52b8c4
commit 90c1c639fe
8 changed files with 476 additions and 223 deletions

View File

@@ -4,14 +4,18 @@
module builtin
fn (a any) toString()
pub fn println(s any) {
JS.console.log(s)
// Quickfix to properly print basic types
// TODO: Add proper detection code for this
JS.console.log(s.toString())
}
pub fn print(s any) {
// TODO
// $if js.node {
JS.process.stdout.write(s)
JS.process.stdout.write(s.toString())
// } $else {
// panic('Cannot `print` in a browser, use `println` instead')
// }