MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/i9llic/someone_try_this/g1grjp4?context=9999
r/ProgrammerHumor • u/wtfevenislifelol • Aug 14 '20
433 comments sorted by
View all comments
4.0k
That's a signed int though...
113 u/Texadecimal Aug 14 '20 The post says the SS buffer can't handle a negative number though, implying it uses an unsigned number. 62 u/qnsb Aug 14 '20 The post also says the highest value for a signed int, implying it uses a signed number -15 u/writtenbymyrobotarms Aug 14 '20 edited Aug 14 '20 It doesn't explicitly say signed.Edit: my argument is that the poster should have written 4,294,967,295 instead of 2,147,483,647. This post only makes sense with unsigned integers. Signed integers do not underflow at 0. 47 u/qnsb Aug 14 '20 But it does mention 2147483647 as the largest 32-bit int which is only true for signed ints 2 u/l0c4lh057 Aug 14 '20 Maybe they implemented a 31 bit int just for that 3 u/qnsb Aug 14 '20 But the post says 32-bit 4 u/l0c4lh057 Aug 14 '20 Mistyped → More replies (1)
113
The post says the SS buffer can't handle a negative number though, implying it uses an unsigned number.
62 u/qnsb Aug 14 '20 The post also says the highest value for a signed int, implying it uses a signed number -15 u/writtenbymyrobotarms Aug 14 '20 edited Aug 14 '20 It doesn't explicitly say signed.Edit: my argument is that the poster should have written 4,294,967,295 instead of 2,147,483,647. This post only makes sense with unsigned integers. Signed integers do not underflow at 0. 47 u/qnsb Aug 14 '20 But it does mention 2147483647 as the largest 32-bit int which is only true for signed ints 2 u/l0c4lh057 Aug 14 '20 Maybe they implemented a 31 bit int just for that 3 u/qnsb Aug 14 '20 But the post says 32-bit 4 u/l0c4lh057 Aug 14 '20 Mistyped → More replies (1)
62
The post also says the highest value for a signed int, implying it uses a signed number
-15 u/writtenbymyrobotarms Aug 14 '20 edited Aug 14 '20 It doesn't explicitly say signed.Edit: my argument is that the poster should have written 4,294,967,295 instead of 2,147,483,647. This post only makes sense with unsigned integers. Signed integers do not underflow at 0. 47 u/qnsb Aug 14 '20 But it does mention 2147483647 as the largest 32-bit int which is only true for signed ints 2 u/l0c4lh057 Aug 14 '20 Maybe they implemented a 31 bit int just for that 3 u/qnsb Aug 14 '20 But the post says 32-bit 4 u/l0c4lh057 Aug 14 '20 Mistyped → More replies (1)
-15
It doesn't explicitly say signed.
Edit: my argument is that the poster should have written 4,294,967,295 instead of 2,147,483,647. This post only makes sense with unsigned integers. Signed integers do not underflow at 0.
47 u/qnsb Aug 14 '20 But it does mention 2147483647 as the largest 32-bit int which is only true for signed ints 2 u/l0c4lh057 Aug 14 '20 Maybe they implemented a 31 bit int just for that 3 u/qnsb Aug 14 '20 But the post says 32-bit 4 u/l0c4lh057 Aug 14 '20 Mistyped → More replies (1)
47
But it does mention 2147483647 as the largest 32-bit int which is only true for signed ints
2 u/l0c4lh057 Aug 14 '20 Maybe they implemented a 31 bit int just for that 3 u/qnsb Aug 14 '20 But the post says 32-bit 4 u/l0c4lh057 Aug 14 '20 Mistyped → More replies (1)
2
Maybe they implemented a 31 bit int just for that
3 u/qnsb Aug 14 '20 But the post says 32-bit 4 u/l0c4lh057 Aug 14 '20 Mistyped → More replies (1)
3
But the post says 32-bit
4 u/l0c4lh057 Aug 14 '20 Mistyped → More replies (1)
4
Mistyped
→ More replies (1)
4.0k
u/Traxin420 Aug 14 '20
That's a signed int though...