Skip to content

Improve sizeof example code #538

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

Merged
merged 1 commit into from
Feb 18, 2019
Merged

Improve sizeof example code #538

merged 1 commit into from
Feb 18, 2019

Conversation

per1234
Copy link
Collaborator

@per1234 per1234 commented Feb 8, 2019

This improves the example code that demonstrates how to use sizeof to determine the number of elements in an array of any type.

  • In the description, specify that we're talking about arrays, just to be absolutely clear.
  • Define the array in the example code.
  • Add an explanatory comment to the for loop

Originally proposed at arduino/reference-pt#222 (comment)

This improves the example code that demonstrates how to use sizeof to determine the number of elements in an array of any type.
- In the description, specify that we're talking about arrays, just to be absolutely clear.
- Define the array in the example code.
- Add an explanatory comment to the for loop
@robsoncouto robsoncouto merged commit 7a1a80b into arduino:master Feb 18, 2019
@per1234 per1234 deleted the improve-sizeof-example branch February 18, 2019 14:15
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

Successfully merging this pull request may close these issues.

2 participants