Weird behavior of zero

I had a much more complicated bug that I was going to try duplicating, but this turned up while I was doing that, and it’s pretty damn weird in itself:

[code]
Printing an approximate number of something is an activity on numbers.

For printing an approximate number for a number (called N):
say “approximately [N]”;

Test is a room.

When play begins:
Repeat with num running from -1 to 5:
say "Now carrying out the printing an approximate number activity with [num]: ";
carry out the printing an approximate number activity with num;
say “[line break]”;[/code]

This outputs:

Is it impossible to pass 0 to an activity on numbers?

I discovered a workaround that’s almost as weird as the original bug:

[code]
Printing an approximate number of something is an activity on numbers.

For printing an approximate number for a number (called N):
if the item described is nothing, now N is 0;
say “approximately [N]”;

Test is a room.

When play begins:
Repeat with num running from -1 to 5:
say "Now carrying out the printing an approximate number activity with [num]: ";
carry out the printing an approximate number activity with num;
say “[line break]”;[/code]

You should report that as a bug. I can sort of see why it’s happening, but Inform should be smart enough to handle that case!

Yes, that definitely looks like a bug and should be reported in Mantis.

Okay then:

inform7.com/mantis/view.php?id=563

The bug holds for all rulebooks in general per inform7.com/mantis/view.php?id=513

Sorry for the duplicate report, then…

Apologies I wasn’t online earlier to save everyone some time. I only say something now because the problem isn’t restricted to just activities, but seemingly to all rulebooks, and for any value that’s implemented as zero.