Yard/tests/program.yard

23 lines
272 B
Plaintext
Raw Permalink 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-09-14 12:50:31 +00:00
@include(/home/servostar/Projects/Yard/tests/lib.yard)
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-09-14 12:50:31 +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-09-14 12:50:31 +00:00
foo()
2023-05-03 10:46:27 +00:00
0
}