Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Reference pages should document function parameter types and default values #4706

Open
Labels
Component: DocumentationRelated to Arduino's documentation content Library: OtherArduino libraries that don't have their own label Type: Bug
@dgatwood

Description

Normally, when I read documentation, I expect it to include data types in every declaration. The Arduino documentation is very inconsistent about this, with some functions containing no declaration at all, some containing a declaration without types, some containing types as part of the text description for parameters, etc. This should really be cleaned up when someone has the time.

Additionally, functions that have multiple variants with optional parameters need to specify what the default value is.

Example: random(min, max) and random(max). One would assume that the declaration is

long random(long min = 0, long max)

but it could just as easily be an overloaded function

long random(long max)
long random(long min, long max)

where the first one uses -max as min.

Including the complete declarations in every function's documentation would go a long way towards clarifying their usage without requiring people to dig through the headers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: DocumentationRelated to Arduino's documentation content Library: OtherArduino libraries that don't have their own label Type: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /