--- title: "Photography" id: 57107 type: "computer_media" slug: "photography" url: "http://localhost/computer_media/photography/" markdown_url: "http://localhost/computer_media/photography.md" published_at: "2024-10-03T23:35:03+00:00" modified_at: "2026-03-30T21:19:57+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/10/56_Photo.png" excerpt: "Enter your flash guide number and subject distance to instantly calculate the correct f-stop aperture — a handy darkroom companion built in BASIC." 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 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Photography" slug: "photography" taxonomy: "genre" url: "http://localhost/type/photography/" media_contents: - id: 56733 title: "Timex Sinclair Public Domain Library Tape 1002" type: "computer_media" url: "http://localhost/computer_media/timex-sinclair-public-domain-library-tape-1002/" media_type: "Program" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2024/10/56_Photo.png" media_type_tags: "Photography" --- # Photography {This program calculates the correct f-stop aperture setting for flash photography using the guide number method. It prompts the user to enter the film/flash guide number and the flash-to-subject distance in feet, then divides the guide number by the distance to produce the required f-stop (F = G/D). After displaying the result, pressing any key clears the screen and restarts the calculation loop, allowing repeated use without reloading. The program structure is minimal and linear, making it a practical pocket-reference tool for photographers. *** ## Program Analysis ### Program Structure The program is a tight, single-loop utility. Lines 10–100 handle input, calculation, and output; line 110 waits for a keypress; lines 120–130 clear the screen and restart. The flow is entirely linear with no subroutines. 1. **Lines 10–20:** Title and decorative heading. 2. **Lines 30–80:** Input prompts and echo for guide number (`G`) and distance (`D`). 3. **Line 90:** Core calculation: `LET F=G/D`. 4. **Line 100:** Displays the recommended aperture. 5. **Line 110:** Busy-wait keypress loop using `INKEY$`. 6. **Lines 120–130:** Clear screen and loop back to start. ### The Flash Guide Number Formula The guide number (GN) method is a standard photographic relationship: `f-stop = GN / distance`. The program implements this directly at line 90. No unit conversion is performed; the prompt at line 60 specifies feet, so the result is only correct when the guide number is rated for feet rather than metres. ### Key BASIC Idioms - **Keypress wait (line 110):**`IF INKEY$="" THEN GOTO 110` is a standard busy-wait loop, holding the result on screen until the user presses any key before cycling back. - **Input echo (lines 50, 80):** After each `INPUT`, the entered value is immediately `PRINT`ed back, confirming what was typed — a common pattern to provide visual feedback. - **Restart via `GOTO 10` (line 130):** Rather than using `RUN` (which would re-initialise variables), `GOTO 10` re-enters the display/input sequence while preserving any variable state, though in this case all variables are re-assigned on each pass anyway. ### Notable Anomalies - **Line numbering gap:** Lines jump from 130 to 150, skipping 140. This is cosmetically unusual but functionally harmless. - **Line 200 (`RUN`):** A `RUN` statement stored as a program line is never reached during normal execution; it exists as a convenience for manually typed execution or as a remnant of editing. - **No input validation:** If the user enters `0` for distance `D`, line 90 will produce a division-by-zero error. A guard such as `IF D=0 THEN GOTO 60` would make the program more robust. - **Result not rounded:**`F` is printed as a raw floating-point value (e.g., `F/6.666...`), which may not map cleanly to standard f-stop markings (f/2, f/2.8, f/4, etc.). A rounding or lookup step would improve practical usability. ### Variable Summary | Variable | Purpose | | --- | --- | | `G` | Flash guide number (user input) | | `D` | Flash-to-subject distance in feet (user input) | | `F` | Calculated f-stop aperture (`G/D`) | ## Source Code ``` 5 REM PHOTOGRAPHY 10 PRINT "FLASH EXPOSURE" 20 PRINT "**************" 30 PRINT "FILM GUIDE NUMBER: "; 40 INPUT G 50 PRINT G 60 PRINT "FLASH/SUBJECT DISTANCE: "; 70 INPUT D 80 PRINT D;" FEET" 90 LET F=G/D 100 PRINT "SHOOT AT F/";F 110 IF INKEY$="" THEN GOTO 110 120 CLS 130 GOTO 10 150 SAVE "1005%6" 200 RUN ```