QB64 Phoenix Edition
Question about Find in Search - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2)
+--- Thread: Question about Find in Search (/showthread.php?tid=2649)



Question about Find in Search - TerryRitchie - 05-02-2024

When you select find in the search menu an input box dialog appears. One of the options you can select is:

[   ] Whole Word

What exactly does this option do? I've been playing around with having it checked and unchecked but I see no difference. What am I missing?


RE: Question about Find in Search - SMcNeill - 05-02-2024

Check for extended versions of your search term.   For example:

PRINT "foo"
PRINT "foobar"

Search for "fo".   Then search for whole word "fo".   Then search for "foo" and whole word "foo".

With whole word, there has to be a match for the whole word -- and JUST the whole word.

"foo" will find "foo", but reject "foobar", for example.  Smile


RE: Question about Find in Search - TerryRitchie - 05-02-2024

(05-02-2024, 04:15 PM)SMcNeill Wrote: Check for extended versions of your search term.   For example:

PRINT "foo"
PRINT "foobar"

Search for "fo".   Then search for whole word "fo".   Then search for "foo" and whole word "foo".

With whole word, there has to be a match for the whole word -- and JUST the whole word.

"foo" will find "foo", but reject "foobar", for example.  Smile
Ah, I see, thanks for explaining this.


RE: Question about Find in Search - TerryRitchie - 05-02-2024

I just discovered a new anomaly concerning Search --> Find. Copy the following code into the IDE.

Go to Search, then Find, and type in _rgb for the search term then hit ENTER

The first instance of _RGB32 is highlighted but not the second instance.

Now, click on the menu toolbar anywhere this is not menu text, just to the right of Tools for example. The second highlight will appear.

The very first time I did the search they both highlighted. But subsequent searches had this strange anomaly.

** Update, ok, now I'm having problems getting this to happen again. It seems using the mouse to access the menu options versus the keyboard may have something to do with this?

Code: (Select All)
'* Animation Demo *
SpriteSheet& = _LOADIMAGE("walksheet104x156.png", 32) '              load sprite sheet
_CLEARCOLOR _RGB32(255, 0, 255), SpriteSheet& '                      set transparent color
SCREEN _NEWIMAGE(104, 156, 32) '                                    enter graphics screen
DO '                                                                begin animation loop
    _LIMIT 5 '                                                      5 frames per second
    CLS , _RGB32(255, 255, 255) '                                    clear screen white
    c = c + 1 '                                                      increment cell counter
    IF c = 6 THEN c = 0 '                                            reset when necessary
    _PUTIMAGE , SpriteSheet&, 0, (c * 104, 0)-(c * 104 + 103, 155) ' display cell from sheet
    _DISPLAY '                                                      update screen change
LOOP UNTIL _KEYDOWN(27) '                                            leave when ESC pressed
SYSTEM '                                                            return to OS