File: loops.t

package info (click to toggle)
nqp 2024.09%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,972 kB
  • sloc: java: 28,087; perl: 3,479; ansic: 451; makefile: 202; javascript: 68; sh: 1
file content (15 lines) | stat: -rw-r--r-- 173 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
puts "1..6"

n = 1

while n <= 3 do
    puts "ok #{n} - while loop"
    n += 1
end

until n > 5 do
    puts "ok #{n} - until loop"
    n += 1
end

puts "ok #{n} - postloop"