|
|
1.1 ! root 1: # This program tests rt/suspend.s ! 2: ! 3: procedure main() ! 4: local line, alpha, n ! 5: alpha := "abcd" ! 6: n := 3 ! 7: write(meander(alpha,n)) ! 8: end ! 9: ! 10: procedure meander(alpha,n) ! 11: local result, t, i, c, k ! 12: i := k := *alpha ! 13: t := n - 1 ! 14: result := repl(alpha[1],t) ! 15: while c := alpha[i] do { ! 16: if find(result[-t:0] || c,result) ! 17: then i -:= 1 ! 18: else {result ||:= c; i := k} ! 19: } ! 20: return result ! 21: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.