Jump to content

Bug: Comparing numeric values


twolpert

Recommended Posts

In the course of trying to document inputs, I had occasion to experiment with various conditions on a numeric variable. I noticed two restrictions that are built into the builder.

 

First, when I choose to compare a numeric variable to a literal value, my only choices of literal values are numbers between 0 and 100, inclusive. I can type in the spin-button box, but it limits the result to 100 or less. Eventually, I imagine that somebody will want to test larger values.

 

Secondly, text or multiple choice inputs can be stored in a number variable. This is definitely handy in situations where we want to treat the input as a number. And the engine (or, at least, the emulator) properly sets the variable to nil when the input is non-numeric. Unfortunately, the builder does not have a construct for testing for nil. There is no way to specify nil as the literal value to test. (In Lua, nil is a type not a value. But the behavior of the equality operator would yield the "right" answer if we could just get a nil in there.)

 

These are definitely minor enhancements, not earth-shaking problems!

 

Tom

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...