You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow for C arguments to be labelled as "Parameters" or "Arguments" #12806
It's just the label shown in the documentation. There's a distinction between arguments and parameters in C and some developers prefer the former label when writing their documentation. Currently, only the "Parameters" label can be used.
Would it be a viable alternative to use .. c:alias:: name? A similar request was made for Python #7609
I'm not sure, I tried replacing a function :arg arguments with an alternative declaration. It's a bit messy and doesn't look the same when rendered:
.. c:function::intfoo(Bar *bar) This is my foo function descriptionNeed a new line Arguments .. c:var:: Bar *bar This is what bar is
Maybe there's a better way but this renders very different to the standard and more concise:
.. c:function::intfoo(Bar *bar) This is my foo function description:arg bar: This is what bar is
Could we not add an option for a function that allows for this switch (similar to :single-line-parameter-list:)? This way we don't have to change the source for this small change
Activity
electric-coder commentedon Aug 20, 2024
Can you remind us of the difference between arguments and parameters and how the current options aren't adequate for C?
torressa commentedon Aug 21, 2024
It's just the label shown in the documentation. There's a distinction between arguments and parameters in C and some developers prefer the former label when writing their documentation. Currently, only the "Parameters" label can be used.
electric-coder commentedon Aug 21, 2024
@torressa I don't have Brian Kernighan and Dennis Ritchie's The C Programming Language on hand, but for a definition we can mention Stack Overflow's canonical: What's the difference between an argument and a parameter?
Would it be a viable alternative to use
.. c:alias:: name? A similar request was made for Python #7609torressa commentedon Aug 28, 2024
I'm not sure, I tried replacing a function
:argarguments with an alternative declaration. It's a bit messy and doesn't look the same when rendered:Maybe there's a better way but this renders very different to the standard and more concise:
Could we not add an option for a function that allows for this switch (similar to
:single-line-parameter-list:)? This way we don't have to change the source for this small changetorressa commentedon Sep 4, 2024
We found a solution by overriding the
CDomainand replacing the function directive. I think this is still nice to have