El 18/04/16 a les 09:53, Marco van de Voort ha escrit:
In our previous episode, J?rgen Hestermann said:
  > in loops. (it is that way in M2 btw, where the basetype is unsigned. Not
  > happy with that)

I don't know what you mean.
A For-loop has it's limits anyway.

Limits like in

for i:=0 to someexpression.count-1

are evaluated as expression before using the result to for. If count=0 this
would become for i:=0 to $FFFFFFFF, so you need to guard this with a if
count>0 then.

Wait, doesn't that evaluate to

 for i:=0 to -1


at least if count is a signed integer?

Bye
--
Luca
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to