math, bigly

Richard Gaskin ambassador at
Wed Aug 9 13:50:04 EDT 2017

Mark Wieder wrote:
 > But what annoys me isn't the fact that baseconvert, etc (bitXor is the
 > one that bit me) only work on integers less than 2^32. It's more the
 > fact that the input data was crunched down to something the functions
 > could handle, and then give me the wrong result with no warning.

I got bit by that once myself.  Sure, we can read all notes for all Dict 
entries for each token we use, but most of the time the engine does a 
good job of informing us when we're using invalid inputs, so it seems 
reasonable that it would do the same here.

Would adding a size check and error handling impair performance much?

Also, yes, it would be nice to see it handle larger values.  But 
regardless of size, being a scripting engine, and one with generally 
good error reporting in most other contexts, it would be nice if invalid 
inputs were reported with baseConvert.

Imagine the frustration of passing an invalid object reference to 
something like the delete command, and rather than reporting that it 
couldn't do what it asked you it just arbitrarily deleted some other 
object instead without notification. ;)

  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  Ambassador at      

More information about the Use-livecode mailing list