Skip to content

Specify data types in function definitions #15

@nickgammon

Description

@nickgammon

I suggest that the types of arguments and return values be specified in the documentation. For example instead of:

Syntax

digitalRead(pin)

Parameters

Returns

HIGH or LOW

State the data types, eg.

Syntax

int digitalRead(byte pin)

Parameters

Returns

HIGH or LOW

You shouldn't have to muck around looking in the source just to find if the argument is a byte or an int, or what type the return value is.

Also in this particular case, couldn't "parameters" be explained? eg.

Parameters

pin: The pin number to read from, on the Arduino board. This is probably not the pin number on the actual processor chip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions