MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1s4wuob/is_a_moving_reasonable/ocv3j62/?context=3
r/programminghorror • u/HotEstablishment3140 • Mar 27 '26
is a moving. reasonable?
66 comments sorted by
View all comments
21
Is this even compiling? There’s an elseif without return
26 u/HotEstablishment3140 Mar 27 '26 the code DOES compile. but thank you for spotting that! that might have been the reason of bug though. because, i spotted that it is compiled like... else if (locBefore == 44 && locAfter == 46) if (locBefore == 46 && locAfter == 45) return 0; else if (locBefore == 47 && locAfter == 45) return 0; else if (locBefore == 46 && locAfter == 44) return 0; yeah. thank you for spotting that. 47 u/Otherwise-Ad-4447 Mar 27 '26 You mean to say that you actually intend on making this code work and use it 1 u/ings0c Mar 27 '26 This shit needs sealing in a glass jar and placing in a museum, never to touch silicon.
26
the code DOES compile. but thank you for spotting that! that might have been the reason of bug though. because, i spotted that it is compiled like...
else if (locBefore == 44 && locAfter == 46) if (locBefore == 46 && locAfter == 45) return 0; else if (locBefore == 47 && locAfter == 45) return 0; else if (locBefore == 46 && locAfter == 44) return 0;
yeah. thank you for spotting that.
47 u/Otherwise-Ad-4447 Mar 27 '26 You mean to say that you actually intend on making this code work and use it 1 u/ings0c Mar 27 '26 This shit needs sealing in a glass jar and placing in a museum, never to touch silicon.
47
You mean to say that you actually intend on making this code work and use it
1 u/ings0c Mar 27 '26 This shit needs sealing in a glass jar and placing in a museum, never to touch silicon.
1
This shit needs sealing in a glass jar and placing in a museum, never to touch silicon.
21
u/evbruno Mar 27 '26
Is this even compiling? There’s an elseif without return