Menu | JAQForum Ver 19.10.27 |
Forum Index : Microcontroller and PC projects : Why doesn't help work for me: Pico 2
> option list PicoMite MMBasic RP2350A Edition V6.00.02 OPTION FLASH SIZE 4194304 OPTION COLOURCODE ON OPTION CPUSPEED (KHz) 150000 > files A:/ <DIR> . <DIR> .. 00:00 01-01-2024 4 bootcount 00:01 01-01-2024 58540 help.txt 2 directories, 2 files, 2072576 bytes free > help humid > open "help.txt" for input as #1: do while not eof(#1): line input #1,a$: if instr(a$,"HUMID") then: ?a$: endif: loop ~DEVICE HUMID Device HUMID ~HUMID pin, tvar, hvar [,DHT11] > help HUMID > This is the first time I've tried the HELP command. But ... > help DEVICE HUMID Device HUMID > help colour > help COLOUR > help CLR > help CLEAR Clear > help ERROR > help exit do Exit Do > OK, I think I see what's happening here with this help file. If the help.txt file contains a line which begins with "~" and contains only the text provided, then the following lines down to the next "~" are printed. If there's more text on the "~" line, it's not considered a match. But if you put "*" after the search text, then you match: > help colour* Colour fore [, back] Or COLOR fore [, back] Colour MAP inarray%(),outarray%() [,colourmap%()] > help files > help files* Files [fspec$] [,sort] Files [fspec$] [,sort] > Perhaps an improvement would be to match if the ~string is a match for the first of the line up to the length of ~string. ~ Edited 2025-07-06 09:31 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||||
![]() |
The Back Shed's forum code is written, and hosted, in Australia. |