Question about coding technique

Just starting out? Need help? Post your questions and find answers here.
TexasGoat
New User
New User
Posts: 2
Joined: Wed Nov 23, 2022 3:44 pm

Question about coding technique

Post by TexasGoat »

While studying a PB Forum spreadsheet example "GridExModule.pbi", I came across some code I cannot find any help\explanation on how it works.

This is psuedo-code inside a module:

Procedure CallMe_ABC()
Procedure CallMe_XYZ()
Procedure CallMe_123()
Procedure CallMe()
--- Some code here ---
CallMe_ABC()
CallMe_XYZ()
CallMe_123()
--- Some code here ---
EndProcedure

My confusion is on the lack of "EndProcedure" statements (based on my assumption a "Procedure" statement requires an "EndProcedure" for the compiler. An obviously wrong assumption because the code in "GridExModule.pbi" compiles and runs quite nicely on my PC.

So, how does this work? Any help\explanation would be appreciated. Thanks!
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Question about coding technique

Post by Fred »

Something is missing as it can't work like that.
User avatar
spikey
Enthusiast
Enthusiast
Posts: 778
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: Question about coding technique

Post by spikey »

There must be one somewhere. The compiler will halt with an error, if there isn't. It's possible that you can't currently see it though. The IDE supports code folding which may be causing parts of the code to be hidden. Check for small + marks in boxes adjacent to line numbers. These indicate sections which have been folded up. Click the mark to unfold it.

Thorsten, who wrote the module you're looking at, uses this feature quite a bit.

See the section "Folding options" in the help article Editing features, which explains more about it.
User avatar
skywalk
Addict
Addict
Posts: 4242
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Question about coding technique

Post by skywalk »

Please post the GridExModule version you are using?
; ---------------------------
; Last Update: 30.10.2018
; ---------------------------
I cannot find the code you show? Maybe that is an example file?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
TexasGoat
New User
New User
Posts: 2
Joined: Wed Nov 23, 2022 3:44 pm

Re: Question about coding technique

Post by TexasGoat »

Thanks spikey! It was folded up!
Quin
Addict
Addict
Posts: 1135
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: Question about coding technique

Post by Quin »

Just as a quick tip, you can also press F4 to fold the current block, or control+f4 to fold all blocks at the given level.
Post Reply