Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/Loops-While/ATS/loops-while-1.ats
Normal file
20
Task/Loops-While/ATS/loops-while-1.ats
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include "share/atspre_staload.hats"
|
||||
|
||||
fn
|
||||
loop_while () : void =
|
||||
let
|
||||
fun
|
||||
loop {n : int | 0 <= n} .<n>.
|
||||
(n : uint n) : void =
|
||||
if n <> 0U then
|
||||
begin
|
||||
println! (n);
|
||||
loop (n / 2U)
|
||||
end
|
||||
in
|
||||
loop 1024U
|
||||
end
|
||||
|
||||
implement
|
||||
main0 () =
|
||||
loop_while ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue