Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 18:21 16 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : INSTR - last optional parameter as in FIELD$ ?

Author Message
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 10:03pm 26 Nov 2020
Copy link to clipboard 
Print this post

Hi Peter,
could be added to INSTR last parameter in similar way like has FIELD$?
So:

CONST STRING a = CHR$(34) + "some text" + CHR$(34)
PRINT INSTR(a, " ")

will return 4, but


CONST STRING a = CHR$(34) + "some text" + CHR$(34)
PRINT INSTR(a, " ", CHR$(34))

will return 0
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4147
Posted: 11:26pm 26 Nov 2020
Copy link to clipboard 
Print this post

I hope it prints 6, not 4!!

John
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 11:33pm 26 Nov 2020
Copy link to clipboard 
Print this post

  JohnS said  I hope it prints 6, not 4!!

John

Of course, I don't know, why my internal calculator is so much miscalibrated    Next time I will really try it on the CMM2...
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025