Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comments for functions #634

Open
moniwe opened this issue Oct 15, 2024 · 6 comments
Open

comments for functions #634

moniwe opened this issue Oct 15, 2024 · 6 comments
Assignees

Comments

@moniwe
Copy link

moniwe commented Oct 15, 2024

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.

grafik

@MartinMelikMerkumians
Copy link
Member

MartinMelikMerkumians commented Oct 15, 2024

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`

@moniwe
Copy link
Author

moniwe commented Oct 15, 2024

yes but how do you add a comment to the input and output events?

@moniwe
Copy link
Author

moniwe commented Oct 15, 2024

and why are you then allowed to add a description?

@MartinMelikMerkumians
Copy link
Member

MartinMelikMerkumians commented Oct 15, 2024

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

@moniwe
Copy link
Author

moniwe commented Oct 15, 2024

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.

@azoitl
Copy link
Contributor

azoitl commented Oct 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants