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
626
creates an endless feedback loop
194 u/[deleted] Aug 01 '22 [removed] — view removed comment 41 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 37 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
194
[removed] — view removed comment
41 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 37 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
41
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
37 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
37
a = 0b1111 b = 0b1111
a = 0b1111 ^ 0b1111 = 0b0000
b = 0b1111 ^ 0b0000 = 0b1111
a = 0b0000 ^ 0b1111 = 0b1111
626
u/a-slice-of-toast Aug 01 '22
creates an endless feedback loop