Skip to content
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

Arduino Zero (SAM) SerialUSB.print(-2147483648); #86

Open
avandalen opened this issue Aug 3, 2016 · 1 comment
Open

Arduino Zero (SAM) SerialUSB.print(-2147483648); #86

avandalen opened this issue Aug 3, 2016 · 1 comment

Comments

@avandalen
Copy link

@avandalen avandalen commented Aug 3, 2016

Printing at the Arduino Zero (SAM) gives an error with:

SerialUSB.print(-2147483648);

Error message:
exit status 1
call of overloaded 'print(long long int)' is ambiguous

This goes well:
int s = -2147483648;
SerialUSB << s << endl;

@oqibidipo
Copy link

@oqibidipo oqibidipo commented Aug 3, 2016

Arduino Zero (SAM)

SAMD actually.

The type of -2147483648 is long long int, because 2147483648 does not fit into int or long int. The sign is not part of the constant, but an unary operator. There is no print(long long int) in the Print class.

@sandeepmistry sandeepmistry transferred this issue from arduino/Arduino Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.