1 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ! Program: INT_DEMO_F_PRINT_POS.INT ! System : INTOUCH DEMONSTRATION SYSTEM ! Author : Allen ! Date : April 30, 1991 ! Purpose: illustrate cursor positioning !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% print at 4, 21 : "This program illustrates how easy it is"; print at 5, 21 : " to position the cursor with INTOUCH."; row% = 3% col% = 1% gosub save_prev do ask_row: when exception in input at 7, 1, prompt "Row (3-23)? ", length 4 : row% use message error : extext$ retry end when if _exit or _back then exit do if (row% < 3%) or & (row% > 23%) then message error : "3 through 23 only" goto ask_row end if ask_col: when exception in input at 8, 1, prompt "Column (1-80)? ", length 4 : col% use message error : extext$ retry end when if _back then goto ask_row if _exit then exit do if (col% < 1%) or & (col% > 80%) then message error : "1 through 80 only" goto ask_col end if position_cursor: gosub restore_prev gosub save_prev print blink, bold, reverse, at row%, col%: "X"; loop stop routine save_prev prev_row% = row% prev_col% = col% ask window area row%, col%, row%, col% : data prev_char$ end routine routine restore_prev set window area prev_row%, prev_col%, prev_row%, prev_col% : & data prev_char$ end routine end