er & !before the limit is reached. Once the full number of characters is & !typed, no more characters (except delimiters) will be accepted. If & !a non-delimiter is typed, it will be echoed as a BEL (character 7). & !Delimiters typed either before or after the limit will terminate the & !input. & ! 10100 ! & !clear the screen and print prompts & ! 10110 PRINT #1%, CLEAR$; 10120 PRINT #1%, FNMOVE$(2%,15%); "***** Normal mode field size five *****"; 10130 PRINT #1%, FNMOVE$(7%,20%); "Field"; \ & PRINT #1%, FNMOVE$(7%,40%); "Echo"; 10200 ! & !input & ! 10210 SIZE% = 5% 10220 FOR I% = 1% TO 5% 10230 PRINT #1%, FNMOVE$(8%+I%,20%); 10240 PRINT #1%, RECORD 256%, CHR$(0%+SIZE%); & ! & !SIZE% is the number of characters to be input, the size of the & !field. It must be less than or equal to 128%. Numbers larger & !than 128% indicate keypunch mode (see below). The 0% is, of & !course, not necessary. It is there to stress the fact that 128% & !was not added to the field size to indicate keypunch mode. & !Be sure to include the ; at the end of the print. If you don't & !the first delimiter printed by the PRINT will be taken as the & !paint character. (See description of the paint character below) & ! 10250 GET #1% \ & FIELD #1%, RECOUNT AS IN$ \ & OUT$ = IN$ + "" & !Mode 8 input must be by GET and not INPUT & !need to save contents of IN$ before the print statement below & !changes the contents of the buffer. 10260 PRINT #1%, FNMOVE$(8%+I%,40%); CVT$$(OUT$,4%); & !OUT$ will have the delimiters, so they must be chopped off & !before it is printed 10270 NEXT I% 10900 ! & !return & ! 10990 RETURN 11000 ! & ! & ! SUBROUTINE: Keypunch mode & ! & ! & ! Keypunch mode differs in that it does not need a delimiter. If & !a delimiter is typed before the field is full, it behaives the same & !as in normal mode. Once the full number of characters is typed, the & !input is complete; no delimiter is necessary. & ! 11100 ! & !clear the screen and print prompts & ! 11110 PRINT #1%, CLEAR$; 11120 PRINT #1%, FNMOVE$(2%,15%); "***** Keypunch mode field size five *****"; 11130 PRINT #1%, FNMOVE$(7%,20%); "Field"; \ & PRINT #1%, FNMOVE$(7%,40%); "Echo"; 11200 ! & !input & ! 11210 SIZE% = 5% 11220 FOR I% = 1% TO 5% 11230 PRINT #1%, FNMOVE$(8%+I%,20%); 11240 PRINT #1%, RECORD 256%, CHR$(128%+SIZE%); & ! & !SIZE% is the number of characters to be input as before. The & !fact that the character printed has an ASCII value larger than & !128% indicates Keypunch mode. (Of course, the number does not & !need to be written as a sum). The other comments in the part on & !normal mode apply. & ! 11250 GET #1% \ & FIELD #1%, RECOUNT AS IN$ \ & OUT$ = IN$ + "" 11260 PRINT #1%, FNMOVE$(8%+I%,40%); CVT$$(OUT$,4%); 11270 NEXT I% 11900 ! & !return & ! 11990 RETURN 12000 ! & ! & ! SUBROUTINE: Paint character & ! & ! & ! In mode 8 (as in ordinary input), a delete character causes the & !previous character to be removed from the input string and causes & !a space to be printed in place of that character. You can specify & !some other character to be used as a "paint" character. You may & !also want to fill in the field with that paint character before & !requesting the ipnut. I have done this only for some of the inputs & ! 12100 ! & !clear the screen and print prompts MODE8 BAS[.050021]MODE8 .BAS[.050021]    X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddf & ! 12110 PRINT #1%, CLEAR$; 12120 PRINT #1%, FNMOVE$(2%,15%); "***** Normal mode field size five *****"; 12130 PRINT #1%, FNMOVE$(3%,25%); "Paint character is _"; 12140 PRINT #1%, FNMOVE$(7%,20%); "Field"; \ & PRINT #1%, FNMOVE$(7%,40%); "Echo"; 12200 ! & !print paint characters in some of the fields & ! 12210 FOR I% = 3% TO 5% 12220 PRINT #1%, FNMOVE$(8%+I%,20%);"_____"; & !so only the last three have the paint character filled in 12230 NEXT I% 12300 ! & !input & ! 12310 SIZE% = 5% 12320 FOR I% = 1% TO 5% 12330 PRINT #1%, FNMOVE$(8%+I%,20%); 12340 PRINT #1%, RECORD 256%, CHR$(0%+SIZE%) + CHR$(95%); & !the first character means the same as before. The second & !character is the paint character. In this case it is an underline 12350 GET #1% \ & FIELD #1%, RECOUNT AS IN$ \ & OUT$ = IN$ + "" 12360 PRINT #1%, FNMOVE$(8%+I%,40%); CVT$$(OUT$,4%); 12370 NEXT I% 12900 ! & !return & ! 12990 RETURN 13000 ! & ! & ! SUBROUTINE: "Fielding" input with mode 8 & ! & ! & !clear screen and print prompts & ! 13010 PRINT #1%, CLEAR$; 13020 PRINT #1%, FNMOVE$(2%,5%);"Input your phone number: ( ) - "; 13100 ! & ! Move cursor in place for area code and input it keypunch mode. & !This will make it impossible to correct the area code once three & !digits have been typed since the input will be automatically & !satisfied. While this may not be desirable, the purpose of this & !part of the program is to demonstate how it can be done. & ! 13110 PRINT #1%, FNMOVE$(2%,31%); 13120 PRINT #1%, RECORD 256%, CHR$(128%+3%); 13130 GET #1% 13140 FIELD #1%, RECOUNT AS IN$ 13150 AREA.CODE$ = IN$ + "" 13200 ! & !same for first three digits of number & ! 13210 PRINT #1%, FNMOVE$(2%,36%); 13220 PRINT #1%, RECORD 256%, CHR$(128%+3%); 13230 GET #1% 13240 FIELD #1%, RECOUNT AS IN$ 13250 FIRST.THREE$ = IN$ + "" 13300 ! & !get rest of number normal mode & ! 13310 PRINT #1%, FNMOVE$(2%,40%); 13320 PRINT #1%, RECORD 256%, CHR$(0%+4%); 13330 GET #1% 13340 FIELD #1%, RECOUNT AS IN$ 13350 LAST.FOUR$ = IN$ + "" 13400 ! & !print out data & ! 13410 PRINT #1%, FNMOVE$(4%,10%);"Area code: "; AREA.CODE$; 13420 PRINT #1%, FNMOVE$(5%,10%);"Prefix: "; FIRST.THREE$; 13430 PRINT #1%, FNMOVE$(6%,10%)"Number: "; LAST.FOUR$; 13900 ! & !return & ! 13990 RETURN 14000 ! & ! & ! FUNCTIONS & ! & ! & !Cursor control(for a terminal in ANSII mode) & ! 14010 DEF* FNMOVE$(ROW%,COL%) = CHR$(155%) + "[" + NUM1$(ROW%) + ";" & + NUM1$(COL%) + "H" 14100 ! & !Pause for input & ! 14110 DEF* FNPAUSE% 14120 PRINT #1%, FNMOVE$(20%,1%); "Hit RETURN to continue "; \ & PRINT #1%, RECORD 256%, CHR$(128%+1%); \ & GET #1% \ & FIELD #1%, 1% AS DUMMY$ 14190 FNEND 32767 END