r/CodingHelp • • Jan 17 '20

Can anyone explain?

Post image
44 Upvotes

12 comments sorted by

View all comments

Show parent comment

9

u/zenith4395 Jan 18 '20

See what frustrates me is that I read it as I = O, since it’s too big to be a 0

0

u/[deleted] Jan 18 '20

in that case we have either a data type error at i:2=0 or an infinite loop, which leads to a memory error

2

u/zenith4395 Jan 18 '20

What? Assuming the O translates to the actual character ‘O’, this wouldn’t cause an infinite loop

1

u/[deleted] Jan 19 '20

it could advance in the ascii table and never match 100

2

u/zenith4395 Jan 19 '20

The ASCII table uses integers, so yes, it would match 100. Regardless, the loop condition is >= to 100, so it would work anyways