Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I create a search file for text?
#6
(01-26-2024, 12:10 AM)SMcNeill Wrote: Another very simple way is to just read the whole file into one string, and then use INSTR with your search term.

Oh yeah that's nice too!

here I made a little AI Game to watch for Guess Number:
Code: (Select All)
'2024-01-25 update
DefInt A-Z
While 1
    Hi = 101: Lo = 0: number = Int(Rnd * 100) + 1
    ' number = 1  'test limits
    ' number = 100
    Do
        guess = Int((Hi + Lo) / 2)
        Print "AI guesses the number ("; _Trim$(Str$(number)); ") as"; guess
        If guess < number Then Print "low": Lo = guess + 1
        If guess > number Then Print "high": Hi = guess - 1
    Loop Until guess = number
    Input "Yeah, press enter for another..."; w$
    Cls
Wend
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
RE: How can I create a search file for text? - by bplus - 01-26-2024, 12:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Photo from png tile, create symmetrical screen image hsiangch_ong 11 936 08-23-2025, 01:23 AM
Last Post: bplus
  Trying to create a simple menu CMR 8 1,201 06-18-2025, 06:59 PM
Last Post: CookieOscar
  IDE search option eoredson 1 531 05-29-2024, 10:15 AM
Last Post: hsiangch_ong
  Create a new character? PhilOfPerth 12 2,157 01-25-2023, 08:07 PM
Last Post: bplus
Question Formatting Text File Output NasaCow 7 1,676 12-08-2022, 11:50 PM
Last Post: NasaCow

Forum Jump:


Users browsing this thread: 1 Guest(s)