Skip to content

[DOC] A better data types explanation is needed #3801

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

Closed
q2dg opened this issue Sep 16, 2015 · 1 comment
Closed

[DOC] A better data types explanation is needed #3801

q2dg opened this issue Sep 16, 2015 · 1 comment
Assignees
Labels
Component: Documentation Related to Arduino's documentation content Type: Duplicate Another item already exists for this topic

Comments

@q2dg
Copy link

q2dg commented Sep 16, 2015

  • In https://www.arduino.cc/en/Reference/Word should be added a note saying that only in AVR boards it is a 2-byte data type : in Due (and Zero???) it is a 4-byte data type (as it is already explained in https://www.arduino.cc/en/Reference/UnsignedInt)
  • Maybe should be added a table somewhere simply showing three columns for each data type (row): the bytes stored in both architectures (AVR & ARM) if it's signed or not and their resepective numerical boundaries. This would help to see, for instance, that in Due (and Zero???) the word type and the unsigned long type are the same and also the int type and the long type, whereas in AVR the short type is equal to int type.
  • @vogonjeltz points in [DOC] Vagueness in data types explanation #3797 that the char type in Due (and Zero???) is unsigned. I haven't a Due and I can't test it, but if it is true, it should be documented too!!

Former points show some mess in data types definitions depending on the architecture of the board (and besides, these definitions are different from ANSI C, as @vogonjeltz points again in #3797). I suppose it's very out of scope of this issue, but maybe a general review of how data types are defined in Arduino platform as a whole should be done.

Thanks

@cmaglie cmaglie added the Component: Documentation Related to Arduino's documentation content label Sep 22, 2015
@agdl
Copy link
Member

agdl commented Feb 18, 2016

@q2dg As you have seen this argument is a little bit hard in the Arduino eco-system :( Since you referenced this issue in the newer one, I'm closing this (they are almost the same) and leaving the other one opened because it is newer so upper in the issue history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Related to Arduino's documentation content Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

4 participants