# bunch of miscellaneous stuff
resource c()
    op putty(char line[1:*])


    char a[1:35]
    int  i = 5;
    char b[1:i]

    b[1:*] = chars("abcde");
    for [ i = 1 to 5 ] {
	write(b[i])
    }

    a[1] = 'a'; a[2] = 'b'; a[3] = 'c'; a[4] = 'd'
    for [ i = 1 to 4 ] {
	write(a[i]);
    }

    a[1:8] = chars("abcd\n\t\r\035");
    for [ i = 1 to 5 ] {
	write(a[i]);
    }

    a[1:27] = chars("abcdefghijklmnopqrstuvwxyz\n")
    putty(a)
    putty(chars("hello, world\n"))

    enum (e0, e2, e3, e4, e5) aa, bb;

    aa = e2; bb = e2;
    if (aa == bb) { write("y")
    } else { write("n")
    }
    if (aa == e2) { write("y")
    } else { write("n")
    }
    if ((aa < e4)) { write("y")
    } else { write("n")
    }
    if ((aa <= e0)) { write("n")
    } else { write("y")
    }

proc putty(line)  {
    write("----", lb(line),ub(line));
    for [ i = lb(line) to ub(line) ] {
	write(line[i])
	if (line[i] == '\n') { exit }
    }
}
end
