02-24-2026, 06:06 AM
Thanks all; I now have a prog that generates R/A files of words of any length (up to 15 letters).
May be useful to other word-game freaks)!
The word- file attached is the "cleaned-up" Collins dictionary
May be useful to other word-game freaks)!
Code: (Select All)
SW = 1040: SH = 720
Screen _NewImage(SW, SH, 32)
SetFont: F& = _LoadFont("C:\WINDOWS\fonts\courbd.ttf", 20, "monospace"): _Font F&
_ScreenMove (_DesktopWidth - SW) / 2, 90
'get longest data length 10, length of FLASHPOINT
Input "Max Data length"; MaxLength
RL = MaxLength + 2 ' Len needs to be extended by 2 bytes
RandFile$ = "RandTo" + LTrim$(Str$(MaxLength))
RecNum = 0
Open "SerialWords.txt" For Input As #1
Open RandFile$ For Random As #2 Len = RL 'prepare R/A file
' Read each word and write to random file
While Not EOF(1)
Input #1, wrd$
If Len(wrd$) <= MaxLength Then
' only put words up to length requested
RecNum = RecNum + 1
Put #2, RecNum, wrd$
End If
Wend
Close
Print "Created "; RandFile$; " with "; RecNum; " records": Sleep 2
Cls
' Verify the random access file
Print: Print "Reading sample from random access file:"
Open RandFile$ For Random As #1 Len = MaxLength + 2
For a = 1 To 20
Get #1, a, wrd$: Print wrd$; " ";
Next
Close
End
Sleep
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) 
Please visit my Website at: http://oldendayskids.blogspot.com/

Please visit my Website at: http://oldendayskids.blogspot.com/

