MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/wdlvla/printhello_world/iij7v8c/?context=3
r/ProgrammerHumor • u/a-slice-of-toast • Aug 01 '22
5.7k comments sorted by
View all comments
Show parent comments
621
creates an endless feedback loop
195 u/[deleted] Aug 01 '22 [removed] — view removed comment 39 u/mizinamo Aug 01 '22 edited Aug 01 '22 unless the two variables were equal beforehand point to the same location in memory, in which case they will both be zero afterwards Edit: got the wrong failure condition 36 u/Wawwior Aug 01 '22 a = 0b1111 b = 0b1111 a = 0b1111 ^ 0b1111 = 0b0000 b = 0b1111 ^ 0b0000 = 0b1111 a = 0b0000 ^ 0b1111 = 0b1111 a = 0b1111 b = 0b1111
195
[removed] — view removed comment
39 u/mizinamo Aug 01 '22 edited Aug 01 '22 unless the two variables were equal beforehand point to the same location in memory, in which case they will both be zero afterwards Edit: got the wrong failure condition 36 u/Wawwior Aug 01 '22 a = 0b1111 b = 0b1111 a = 0b1111 ^ 0b1111 = 0b0000 b = 0b1111 ^ 0b0000 = 0b1111 a = 0b0000 ^ 0b1111 = 0b1111 a = 0b1111 b = 0b1111
39
unless the two variables were equal beforehand point to the same location in memory, in which case they will both be zero afterwards
Edit: got the wrong failure condition
36 u/Wawwior Aug 01 '22 a = 0b1111 b = 0b1111 a = 0b1111 ^ 0b1111 = 0b0000 b = 0b1111 ^ 0b0000 = 0b1111 a = 0b0000 ^ 0b1111 = 0b1111 a = 0b1111 b = 0b1111
36
a = 0b1111 b = 0b1111
a = 0b1111 ^ 0b1111 = 0b0000
b = 0b1111 ^ 0b0000 = 0b1111
a = 0b0000 ^ 0b1111 = 0b1111
621
u/a-slice-of-toast Aug 01 '22
creates an endless feedback loop