Yard/tests/program.yard

19 lines
203 B
Plaintext
Raw Normal View History

2023-05-03 10:46:27 +00:00
@feature(io, conv, math)
2023-01-02 11:06:30 +00:00
@version(100)
@author(Sven Vogel)
2023-05-03 10:46:27 +00:00
max(a:int, b:int)=int {
despite a < b {
yield a
2023-01-02 11:06:30 +00:00
}
2023-05-03 10:46:27 +00:00
b
2023-01-02 11:06:30 +00:00
}
2023-05-03 10:46:27 +00:00
# main function
2023-01-02 11:56:53 +00:00
main = int {
2023-01-02 11:06:30 +00:00
2023-05-03 10:46:27 +00:00
println("" .. max(3,4));
2023-01-02 11:06:30 +00:00
2023-05-03 10:46:27 +00:00
0
}