Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
smarinov
· 10y ago · 0 comments
You probably mean that it will
always
seek food since the assignment evaluates to 'true' when it's successful (which is usually the case).
Comments
[–]
TeMPOraL
10y ago
In what language? In all that I know, assignment evaluates to the value that was assigned (that is, if it evaluates to anything at all). Also in most languages that look like C, 0 evaluates to false. Therefore it will
never
seek food.
[–]
saynsedit
10y ago
Usually the case as in usually never the case.