Open moniwe opened 1 month ago
You add a comment to the function, by placing a multiline comment above the function e.g.
/*This is not the best function in the world, this is just a tribute*/
FUNCTION TRIBUTE
<VAR Body>
<function body>
END_FUNCTION```
For comments on the in- and outputs, you add them with line comments in the same line or multiline comments above
e.g.
`IMPORTANT_DATA : REAL; // Important REAL data`
yes but how do you add a comment to the input and output events?
and why are you then allowed to add a description?
I think we didn't add a comment to events, as the meaning is always the same. REQ = start and CNF = finished execution. Also there are no equivalents to event in and outs in the ST representation.
The ST code is the main source of truth here, as the FB form of the code is rather only an auto-generated wrapper.
For the description field is again no equivalent thing in ST, although I would like to have some kind of doxygen or javadoc syntax to add it to the ST code as well.
We could call it STdoc? 😜
But that's a good point, that this part is handled by the properties sheet
I think that for the user it is confusing, that the other editors allow to edit these fields and you see it here as well but cannot use it. I can understand it for the tab of the interface elements even if i would prefere not seeing this interface tab if i am not allowed to add elements there.
With the upcoming rework of the type editors (#560) we could also easily remove the interface tab. But I heard that some users like to see the interface as the resulting block type.
I would like to be able to enter comments for functions as it is shown within the following image, since entering a description is possible it would be natural for me also being able to enter comments. When creating a function within the 4diac-ide it does not seem to be possible to edit the comment fields within the tabbed properties. It seems that this way it is not possible to set comments for the events within the interface, since they are not listed within the Algorithm tab.