Using <Ctrl + Shift + F> to get syntax?

Am I using the IDE Help feature correctly?

With 'end if' selected (and no more on that line) I use <Ctrl + Shift + F>. On the resulting browser page only 'End' has been used. So I type the change needed to get 'end if', and then choose Documentation. That gives me 94 hits and none of the 18 on the first page show 'end if'. The very first 'hit' is headed 'MKRGSM - voice.voiceCall()', which contains neither 'end' nor if'!

Should I ignore this facility and insead use Help > Reference, and then find the string I want myself on that page?

Please post an example sketch that contains "end if" so that we can try this for ourselves, or did you perhaps means "else if"

what are you trying to do?
what do you expect ctl-shift-F to do?

HelpRef-2

Please post your "end if" example

That was a poor example *, but my question was general. Try the familiar if instead. Below is a screenshot of the 'help' provided. 854 hits with 18 on first page, the first of which is headed Webhooks with Arduino IoT Cloud And none showing simply the syntax of the 'if' command, which is what I'd expected to be the opening entry.

I'll stick to my alternative, Help > Reference. The KB shortcut would be better deployed on that IMO. Even better if it took you straight to the string concerned,


  • I'm not surprised you're curious about my 'end if'. Haven't done any Arduino coding for a month or so. But spent most of last week writing macros with my application Macro Express Pro. It expects every 'If' section to be ended with an 'End If', and I guess it was muscle memory prompting that. :slightly_smiling_face:

Since when is there an "end if" in c or c++???

Did you try clicking on the Reference checkbox of the page that is returned ?

Personally I think that the Reference should only contain details of Arduino specific functions and not general C/C++ functions, otherwise where do you stop ?

Did you read my post #6?

A preprocessor #if macro block is ended by an #endif, not an "End If".

Did you mean #endif, a preprocessor directive?
https://oneplanetonechild.org/what-is-endif-in-c/

What does that have to do with Macro Express Pro?

Sorry, I assumed Macro Express Pro was some automated tool for generating C++ preprocessor macros. My bad.

Thanks, no I didn't. Still think it's a long route to get syntax. (And in my original 'end if' example I suppose I'd quickly have come to conclude there is no such command.)

What does Macro Express Pro have to do with Arduino??? There is NO "end if" in c, or c++, or c/c++ pre-processor macros, so you seem to be asking about something that has nothing whtsoever to do with Arduino

And you would have be correct, at least as far as the Arduino environment is concerned

Eh? I wasn’t asking about Macro Express Pro. The context was explaining to @UKHeliBob how ‘end if’ arose. As I’d have thought very obvious.

Understood, no problem. :slightly_smiling_face:

I wasn’t even writing macros for the Arduino IDE, although I have a dozen or so.

I still don't understand how or why your Arduino code contained "end if" and why you thought that Ctrl + Shift + F would find it in the Arduino reference

Because I carelessly typed it as a new line after an else{}, probably for the reason I explained. Although that mistake was quickly corrected, the more general one remained.

It’s a shame there is no one-click or KB shortcut for getting straight to the syntax of a selected string. And ideally, a ‘No such command’, in cases like ‘end if’.