1

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?

4

1 に答える 1

3

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

于 2011-01-31T12:43:40.940 に答える