--- title: "Spanish Builder II" id: 54558 type: "computer_media" slug: "spanish-builder-ii" url: "http://localhost/computer_media/spanish-builder-ii/" markdown_url: "http://localhost/computer_media/spanish-builder-ii.md" published_at: "2024-06-02T16:58:51+00:00" modified_at: "2026-03-30T21:45:27+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/06/spanish-builder-2.png" excerpt: "A two-way vocabulary quiz lets you drill either direction through a word list, tracking each answer to avoid repeating questions within a round." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" genre: - name: "Education" slug: "education" taxonomy: "genre" url: "http://localhost/type/education/" - name: "Spanish" slug: "spanish" taxonomy: "genre" url: "http://localhost/type/spanish/" media_contents: - id: 51207 title: "CATS Library Tape 6" type: "computer_media" url: "http://localhost/computer_media/cats-library-tape-6/" media_type: "Program" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2024/06/spanish-builder-2.png" related_content: - id: 54557 title: "Spanish Builder I" type: "computer_media" url: "http://localhost/computer_media/spanish-builder-i/" media_type_tags: "Education, Spanish" --- # Spanish Builder II This program implements a two-way vocabulary quiz module, likely part of a larger language-learning system, testing either English-to-foreign or foreign-to-English translation. It uses parallel string arrays — `E$()` for English words and `F$()` for foreign-language words — along with a tracking array `C$()` that records already-tested items to prevent repeats within a round. The correct answer is displayed both as a single line and then animated across the screen using a `FOR`/`NEXT` loop printing at every other row in two columns, providing a brief reinforcement effect. The program saves itself with an auto-start entry point at line 85, suggesting it is part of a multi-module vocabulary builder suite. *** ## Program Analysis ### Program Structure This listing is a self-contained quiz module, beginning at line 85 with setup and running through two main subroutines. It is designed to be called as part of a larger vocabulary builder, with word data (arrays `E$()`, `F$()`, and the count variable `W`) presumably loaded or defined elsewhere before line 85 is reached. 1. Lines 85–140: Setup, mode selection, and round-completion logic 2. Lines 700–820: Subroutine — English-to-foreign quiz (Test 1) 3. Lines 900–1015: Subroutine — Foreign-to-English quiz (Test 2) 4. Lines 9997–9998: Stop and SAVE ### Quiz Logic and Repeat-Prevention Both subroutines share the same anti-repeat mechanism. A counter `Q` tracks how many words have been tested in the current round, and `C$()` stores the words already used. Each time a random index `R` is chosen via `INT (W*RND)+1`, a `FOR P=1 TO Q` loop checks whether the chosen word already appears in `C$()`. If it does, the subroutine loops back to pick a new random index. This ensures every word in the vocabulary list is tested exactly once per round. ### Answer Display and Reinforcement Effect After each answer, the correct translation is shown once as a standard `PRINT` statement, then repeated across the screen using `AT` positioning. A `FOR X=10 TO 20 STEP 2` loop prints the answer at rows 10, 12, 14, 16, 18, and 20, in two columns (positions 0 and 15), creating a tiled reinforcement display before the screen is cleared or paused. ### Key Variables | Variable | Purpose | | --- | --- | | `W` | Total number of vocabulary words (set externally) | | `E$()` | Array of English words | | `F$()` | Array of foreign-language words | | `L$` | Name of the foreign language (set externally, used in prompts) | | `Q` | Count of words tested this round | | `C$()` | Array recording words already tested this round | | `R` | Randomly chosen word index | | `A$` | User’s typed answer (accepted but not evaluated) | | `CH` | User’s mode choice (1 or 2) | ### Notable Techniques and Idioms - **No answer grading:** The user’s input `A$` is collected but never compared against the correct answer. The program functions as a prompted self-check rather than a scored test. - **Delay loop:** Line 800 uses `FOR D=1 TO 200: NEXT D` as a busy-wait pause in Test 1. Test 2 uses `PAUSE 90` instead — an inconsistency between the two subroutines. - **PAUSE 0 / INKEY$ idiom:** Line 127 uses `PAUSE 0` followed by `INKEY$` checks at lines 130–135 to wait for a keypress before deciding whether to repeat the round or proceed to save. - **Restart via GO TO 90:** Line 130 branches to line 90, which does not appear in this listing, implying it exists in an earlier portion of the full program that resets state for a new round. ### Bugs and Anomalies - Lines 130 and 135 both use `INKEY$` after `PAUSE 0`. Since `PAUSE 0` waits for *any* key and then returns, `INKEY$` will be empty by the time line 130 is evaluated, unless the key is still held. This is a common but unreliable pattern; the key may or may not still be depressed when line 135 is reached, making the “N” branch potentially unreachable in practice. - The `C$()` array is initialized to `Q=0` at line 95 but the array itself is never explicitly dimensioned here, relying on prior setup code. - Line 135’s message instructs the user to “GOTO 9998,” which in context means the program will auto-save — but the `PAUSE 360` and `STOP` at line 140 execute regardless of whether the user pressed “Y” or “N”, meaning a “N” response leads to an auto-save regardless after the delay. ## Source Code ``` 85 REM CHOOSE TEST 86 BORDER 3: INK 0: PAPER 6 95 LET Q=0: LET G=0 100 PRINT "1)ENGLISH TO ";L$;"?" 105 PRINT "2)";L$;" TO ENGLISH?" 110 INPUT "CHOICE--1 OR 2?";CH 115 IF CH=1 THEN GO SUB 700 120 IF CH=2 THEN GO SUB 900 125 PRINT "YOU HAVE COMPLETED A ROUND",," DO YOU WANT TO DO MORE?(Y/N)" 127 PAUSE 0 130 IF INKEY$="Y" THEN GO TO 90 135 IF INKEY$<>"Y" THEN PRINT "AUTO SAVE WILL PRESERVE ENTERED VOCABULARY. GOTO 9998" 140 PAUSE 360: STOP 700 REM TEST 1 705 LET R=INT (W*RND)+1 710 REM TO CHECK PREVIOUS ANSWERS 715 FOR P=1 TO Q 720 IF F$(R)=C$(P) THEN GO TO 705 725 NEXT P 730 CLS 735 PRINT "ENGLISH WORD: ";E$(R) 740 INPUT "TRANSLATION? ";A$ 780 PRINT "THE MEANING OF ";E$(R),,"IS",,F$(R) 783 FOR X=10 TO 20 STEP 2 784 PRINT AT X,0;F$(R): PRINT AT X,15;F$(R) 785 NEXT X 800 FOR D=1 TO 200: NEXT D 801 CLS 805 LET Q=Q+1: LET C$(Q)=F$(R) 810 IF Q=W THEN GO TO 820 815 GO TO 700 820 RETURN 900 REM TEST 2 905 LET R=INT (W*RND)+1 910 FOR P=1 TO Q 915 IF E$(R)=C$(P) THEN GO TO 905 920 NEXT P 925 CLS 930 PRINT L$;" WORD: ";F$(R) 935 PRINT "ENGLISH EQUIVALENT: " 940 INPUT A$ 975 PRINT "THE MEANING OF",,F$(R),," IS ",,E$(R) 976 FOR X=10 TO 20 STEP 2 977 PRINT AT X,0;E$(R): PRINT AT X,15;E$(R) 978 NEXT X 980 PAUSE 90 1000 LET Q=Q+1: LET C$(Q)=E$(R) 1005 IF Q=W THEN GO TO 1015 1010 GO TO 900 1015 RETURN 9997 STOP 9998 SAVE "SPANBLDR2" LINE 85 ```