White Space as Block Comments

Is there any way to insert “White Space” between connected blocks as an additional way to comment?

For example, in languages like C I would insert a blank line between lines of code to separate logical functions and aid readability. Suppose one logical function is to step through a list and modify each element. This is a block of half a dozen lines of C code or three or four Kodular blocks. The next logical function might be to step through the list writing each element to a file – just an example. This is another block of half a dozen lines of C code or three or four Kodular blocks. I would probably put a blank line between each of these two logical functions just to separate them for anybody reading the code.

I could envision a single height blank yellow block in the “controls” group that does nothing except insert “White Space” separating one sequence of blocks from another.

Does something like this exist?

Barry.

Each block of code in Kodular is a different procedure, event, etc.
That in itself makes them separated.
But if you want, you could use the “Evaluate but ignore result” block and ad a text block with a long line of dashes, like ---------------------------------.

2 Likes

Great to see you back! :joy:

1 Like

Evaluate but ignore – that’s a possibility.

I find using White Space, rather than just jamming everything together, very helpful in improving readability.

The Kodular blocks seem to correspond to individual statements. Three or more blocks may be required to perform a logical “task”. One way to think of writing code is by assembling multiple statements into “tasks” to complete some higher-level logical function. I’ve always found it helpful to separate groups of statements that perform a task with white space.

I will give your suggestion to try. If others agree, in the future, maybe this “white space” block could be added.

Barry.

1 Like

Then another thing that might help you, as it helps me is to set the blocks as “inline” as much as possible.
To me is more like the regular coding format, where each code line is in a physical line.
I find it more difficult to read the blocks when they have the parameters stacked from top to bottom. I see it as a waste of vertical space. I know this is a behavior inherited from text coding. I don’t do that anymore, but I still prefer this format. See this example:

2 Likes

I agree. I use in-line frequently.

1 Like