Console output in clay programming language

340 Views Asked by At

I want to play around with clay a little but I did not figure out how to get the output to display on the console. Is there any library function I could use? And related to this question: where can i find some documentation?

1

There are 1 best solutions below

2
On BEST ANSWER

It looks as though the println function should do what you want. It is implicitly imported from a standard library.

println("Hello, World!");

Documentation seems sparse, but there is a wiki.

This looks like and interesting language. Thank you for pointing it out.

Edit: Here is a little example I whipped up for console input.

main() {
    println("What is your name: ");
    var name = readLine(stdin);
    println("Hello, ", name);
}

It looks like the best source of information is the source code of the bundled libraries. In this case, I looked at io/streams/streams.clay