--- title: "Spanish Builder I" id: 54557 type: "computer_media" slug: "spanish-builder-i" url: "http://localhost/computer_media/spanish-builder-i/" markdown_url: "http://localhost/computer_media/spanish-builder-i.md" published_at: "2024-06-02T16:57:57+00:00" modified_at: "2026-03-30T21:45:26+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2019/02/20230809-041332.jpg" excerpt: "A two-way vocabulary quiz lets you drill word pairs in either direction, tracking which words you've already answered to avoid repeats 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-tutor-1.png" related_content: - id: 54558 title: "Spanish Builder II" type: "computer_media" url: "http://localhost/computer_media/spanish-builder-ii/" media_type_tags: "Education, Spanish" --- # Spanish Builder I This program is a two-way vocabulary quiz that tests the user on word pairs stored in parallel string arrays, supporting both English-to-foreign and foreign-to-English directions. The language name is held in the variable `L$`, and word pairs are stored in `E$()` (English) and `F$()` (foreign), with `W` holding the total word count — all presumably initialized in an earlier, not-listed portion of the program. A previously-answered-word tracking mechanism uses array `C$()` and counter `Q` to prevent repeating questions within a single round. Correct answers are displayed in a decorative tiled pattern using nested `FOR` loops with `PRINT AT` across multiple screen positions. The program auto-saves itself with `SAVE “SPANBLDR1” LINE 85` to preserve the vocabulary data between sessions. *** ## Program Analysis ### Program Structure This listing is a fragment of a larger vocabulary-building program (the name “SPANBLDR1” in the `SAVE` command suggests a Spanish vocabulary builder). Lines before 86 are not shown but presumably handle initialization of `L$`, `E$()`, `F$()`, `W`, and `C$()`. The visible code divides into three logical blocks: 1. Lines 86–135: Main menu and round control loop 2. Lines 700–820: Subroutine — English-to-foreign quiz 3. Lines 900–1015: Subroutine — Foreign-to-English quiz ### Variable Usage | Variable | Purpose | | --- | --- | | `L$` | Name of the target language (e.g., “SPANISH”) | | `E$()` | Array of English words | | `F$()` | Array of foreign-language words | | `W` | Total number of word pairs | | `Q` | Count of words answered in the current round | | `C$()` | Array recording already-used words to prevent repeats | | `R` | Randomly selected word index | | `CH` | User’s menu choice (1 or 2) | | `A$` | User’s input answer (collected but not evaluated) | ### Anti-Repeat Mechanism Both quiz subroutines use a linear scan of the `C$()` array to ensure that a randomly selected word has not already been tested in the current round. In subroutine 700 (lines 715–725), if `F$(R)` matches any previously stored `C$(P)`, a new random index is chosen by jumping back to line 705. The same logic appears at lines 910–920 in subroutine 900, checking `E$(R)` against `C$(P)`. This is a simple but effective guard against repetition, though it could loop indefinitely if `W` is small and all words have been used — a condition that should not occur because the round ends when `Q=W`. ### Answer Display — Tiled Pattern After revealing the correct answer, both subroutines display the answer word tiled across the screen using nested `FOR` loops (lines 783–785 and 976–978). The outer loop steps `Y` from 0 to 30 in steps of 12 (columns), and the inner loop steps `X` from 10 to 20 in steps of 2 (rows), printing the word at each intersection with `PRINT AT X,Y`. This creates a decorative grid of repeated correct answers as visual reinforcement. ### Bugs and Anomalies - **Answer is never checked:** In both subroutines, the user’s input is stored in `A$` but is never compared to the correct answer. The program always reveals the correct answer unconditionally. There is no right/wrong feedback, score tracking, or differentiation between correct and incorrect responses. - **Subroutine 900 never increments `Q` or stores to `C$()` via its own path:** Lines 1000–1015 handle the `Q` increment and `C$(Q)` assignment for Test 2, but line 986 jumps directly back to line 900 (`GO TO 900`) without passing through line 1000. This means `Q` is never incremented in the foreign-to-English test, and the round-complete condition `Q=W` at line 1005 is never reached. The Test 2 subroutine effectively loops forever and never returns. - **Line 130 / 135 keypress logic:**`PAUSE 0` at line 127 waits for any key, but lines 130 and 135 then read `INKEY$` in sequential statements. Since `PAUSE 0` resumes on any keypress and the key may no longer be held, the `INKEY$` reads at 130 and 135 may both return empty string, causing neither branch to execute and the program to fall through to the `STOP` at line 9997. - **Line 135 prints `240` as a literal number:**`PRINT 240` outputs the numeric value 240, which appears to be a mistake — likely intended to be a string message or a line reference that was incorrectly coded. - **Line 130 references `GO TO 90`** but the listing begins at line 86, suggesting line 90 exists in the unlisted initialization section. ### Key BASIC Idioms - Delay loop via `FOR D=1 TO 200: NEXT D` at line 800 — a busy-wait timing technique. - `PAUSE 90` at line 980 provides a fixed ~1.6-second pause before continuing. - `INT (W*RND)+1` produces a random integer in the range 1 to `W`, the standard idiom for selecting a random array index. ## Source Code ``` 86 BORDER 3: INK 0: PAPER 6 92 CLS 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 VOCABULARY": PRINT 240: GO TO 1020 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 Y=0 TO 30 STEP 12: FOR X=10 TO 20 STEP 2 784 PRINT AT X,Y;F$(R); 785 NEXT X: NEXT Y 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 Y=0 TO 30 STEP 12: FOR X=10 TO 20 STEP 2 977 PRINT AT X,Y;E$(R) 978 NEXT X: NEXT Y 980 PAUSE 90 986 GO TO 900 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 "SPANBLDR1" LINE 85 ```