#!/usr/bin/env rexx

::requires "ncurses.cls"

lf = .window~ASCII_LF~d2c()
bs = .window~ASCII_BS~d2c()

text = .array~of('Do', 'you', 'find', 'this', 'silly?')

scr = .window~new()
do a = 1 to text~items()
    do b = 1 to text~items()
        if b = a then scr~attrset(scr~A_BOLD + scr~A_UNDERLINE)
        scr~addstr(text[b])
        if b = a then scr~attroff(scr~A_BOLD + scr~A_UNDERLINE)
        scr~addch(' ')
    end
    scr~addstr(bs || lf)
end

/* Forces a pause to wait for input. Poor man's wait. */
scr~getch
scr~endwin

Exit

