/usr/share/doc/intercal/examples/bubble.i is in intercal 28:0.28-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | DO WRITE IN .2
DO ,1 <- .2
PLEASE NOTE INITIAL SEQUENCE INPUT
DO .1 <- .2
DO (110) NEXT
(110) DO FORGET #1
DO WRITE IN ,1 SUB .1
DO (111) NEXT
(112) DO (2010) NEXT
DO FORGET #2
DO (110) NEXT
(111) DO (112) NEXT
DO FORGET #1
PLEASE NOTE CALLING SORT ROUTINE INDIRECTLY
DO .1 <- .2
DO (500) NEXT
PLEASE NOTE SORTED SEQUENCE OUTPUT
DO .1 <- .2
DO (210) NEXT
(210) DO FORGET #1
DO READ OUT ,1 SUB .1
DO (211) NEXT
(212) DO (2010) NEXT
DO FORGET #2
DO (210) NEXT
(211) DO (212) NEXT
DO FORGET #1
PLEASE GIVE UP
PLEASE NOTE COMPARE AND EXCHANGE ROUTINE
(500) PLEASE ABSTAIN FROM (502)
DO (3000) NEXT
DO (501) NEXT
(501) DO FORGET #1
(502) DO (3010) NEXT
PLEASE REINSTATE (502)
DO .3 <- '?",1SUB.1"$,1SUB.2'~'#0$#65535'
DO .3 <- '?"'& "'",1SUB.1"~.3'~'"?'?.3~.3'$#32768"~"#0$#65535"'" $
".3~.3"'~#1" $
#1'~#3
DO (503) NEXT
DO .3 <- ,1 SUB .1
DO ,1 SUB .1 <- ,1 SUB .2
DO ,1 SUB .2 <- .3
DO (501) NEXT
(504) PLEASE RESUME .3
(503) DO (504) NEXT
DO FORGET #1
DO (501) NEXT
PLEASE NOTE BUBBLE SORT ROUTINE
PLEASE NOTE THAT EXCHANGE ROUTINE SHOULD NOT CHANGE .1 OR .2
(3000) PLEASE STASH .1 + .2
DO .2 <- .1
DO (2000) NEXT
DO (3001) NEXT
(3001) DO FORGET #1
DO RESUME #1
(3011) DO (2010) NEXT
DO FORGET #1
DO (3001) NEXT
(3010) DO (3011) NEXT
DO (3012) NEXT
(3013) DO .1 <- .2
DO (2010) NEXT
DO FORGET #2
DO .2 <- .1
DO (3010) NEXT
DO RESUME #1
(3012) DO (3013) NEXT
PLEASE RETRIEVE .1 + .2
DO RESUME #4
(2010) PLEASE ABSTAIN FROM (2004)
(2000) PLEASE STASH .2
DO .2 <- #1
DO (2001) NEXT
(2001) DO FORGET #1
DO .1 <- '?.1$.2'~'#0$#65535'
DO (2002) NEXT
DO .2 <- !2$#0'~'#32767$#1'
DO (2001) NEXT
(2003) PLEASE RESUME "?!1~.2'$#1"~#3
(2002) DO (2003) NEXT
PLEASE RETRIEVE .2
(2004) PLEASE RESUME #2
PLEASE DO REINSTATE (2004)
PLEASE RESUME '?"!1~.1'~#1"$#2'~#6
|