! VUE.BAS how to use Dave Pallman's VUE.SBR ! by James A. Jarboe IV, GR/AM (409) 295-5767 ! 02/20/86 ! ! VUE.SBR by Dave Pallman allows editing of a string with VUE-like editing. ! This is a simple demo of how I use it ! Hope it helps someone else ! ! XCALL VUE,ST,ROWS,COLUMNS,LEFTROW,LEFTCOL ! ! ST = variable string to input or change ! I map it as ARRAY(?) to make display easier ! although just using the ST as the variable will work just as well ! ROWS = the maximum amount of rows you choose to use ! COLUMNS = the maximum amount of columns you choose to use ! START'ROW = the row that you wish the editing to begin on. ! This is actually the row minus 1. In other words if you ! want the display to start on row 5 then make START'ROW = 4 ! ! START'COL = the column that you wish the editing to begin on. ! This is actually the column minus 1. In other words if you ! want the display to start on column 8 then make START'COL = 7 ! ! ESCAPE : the escape key gets you out of the VUE.SBR editing mode and ! : returns the string ST with the changes you have made ! ! EXTRA - Using START'ROW, START'COL, ROWS, and COLUMNS for your ? TAB ! Statements makes movement of the editing area easier than changing ! everything. I.E. try changing the value of START'ROW to 5 and ! START'COL to 8 and everything moves accordingly ! MAP1 ST ! make string length as long as you want MAP2 ARRAY(4),S,64 ! easier way to get at display of ST ! this string is 256 bytes long MAP1 ROWS,F,6,4 ! maximum number of rows you want to have MAP1 COLUMNS,F,6,64 ! maximum number of columns per row that you want MAP1 START'ROW,F,6,3 ! what screen row you want to start display at-1 MAP1 START'COL,F,6,3 ! what screen col you want to start display at-1 MAP1 DASH,S,66 ! horizontal border FOR I = 1 TO 2 DASH=DASH+"---------------------------------" NEXT I CLEAR'SCREEN: ? tab(-1,0); PRINT'BORDER: ! print borders around editing area and show user some columns and rows ! for reference ? TAB(START'ROW,START'COL);DASH FOR I=1 TO 4 ? TAB(START'ROW+I,START'COL);"|"; ? TAB(START'ROW+I,START'COL+COLUMNS+1);"|"; NEXT I ? TAB(START'ROW+ROWS+1,START'COL);DASH ? TAB(1,1);"1234567890";! lets see what column is where ? " column positions" FOR I=2 TO 9 ! lets see what row is where ? TAB(I,1);I USING "#" NEXT I LOAD'STRING: ! could be a read statement or could be nothing ST = "THIS IS THE STRING ST. IT CAN BE INPUT BY PROGRAM OR BY & READING A SEQUENTIAL OR RANDOM FILE AND INPUTTING THE DATA & TO THE STRINGST. MAKE ANY CHANGES YOU WANT, HIT THE & AND I WILL SHOW YOUTHE CHANGES YOU MADE." PRINT'STRING: ! display data to edit using VUE.SBR FOR I= 1 TO 4 ? TAB(START'ROW+I,START'COL+1);ARRAY(I); NEXT I SHOW'TABLE: ! what you can do in VUE.SBR ? TAB(10,1); ? " These are the useable control codes in vue.sbr" ? ? " ^H (BACKSPACE, LEFT-ARROW)" ? " ^L (RIGHT ARROW)" ? " ^K (UP-ARROW)" ? " ^J (LINE FEED, DOWN-ARROW)" ? " ^M (RETURN)" ? " ^U (BEGINNING OF LINE)" ? " ^N (END OF LINE)" ? " ^Y (ERASE FROM CURSOR TO END OF LINE" ? " GET OUT OF VUE.SBR OR BACK TO PROGRAM" VUE: ! here it is the infamous VUE.SBR XCALL VUE, ST,ROWS,COLUMNS,START'ROW,START'COL RESHOW'DATA: ! reprint string just to show that vue.sbr does change the string FOR I=1 TO 4 ? TAB(START'ROW+I,START'COL+1);ARRAY(I); NEXT I DO'AGAIN: ? TAB(23,1); INPUT "Would you like to re-edit the string ?",Y$ ? tab(23,1);TAB(-1,10); IF Y$[1;1]="Y" THEN GOTO VUE ? TAB(-1,0);"Hope this helps someone !!!!" END