Making errors clearly visible (situation improved from v.10.1.7)

This script, when run, reports an error:
variable creation benchmark script pic 15

variable creation benchmark script pic 13

But when it is called by run, no error is reported - it just keeps running indefinitely:

variable creation benchmark script pic 16

Same with call. Does anyone know why?

Applicative order of evaluation. First, all the inputs are evaluated, then they are passed to the function, i.e. the block. At that time "v1" has not yet been declared.

How does that explain the running forever when used with RUN?

What makes you think that it "runs forever"? It stops running and displays a red halo to indicate an error.

I see. But why is no error message displayed?

Oops, sorry. I forgot Gorin's Law: "Never believe anything a user says." :frowning:

technically the $greenFlag::#fff is lit up, showing that the script is supposedly running, and is only reverted back to the normal $greenFlag::#fff after clicking the $stop::#fff or using a stop [all V] block. (truly a lot of snapblocks used in this post because why not)

Technically, this (the fact that the green flag is highlighted) is the case with all errors, so this error is no different. But I see your point - @qw23 may nevertheless have been deceived by the counterintuitive green flag button state.

Yeah I think the idea is that you click the stop button to remove the red halo for the error and that's why it has to be considered as still running even though it isn't really.

fixed!

untitled script pic 342

BTW …

let blocks script pic

Apropos halos

I have noticed:

  • if the IDE background colour is white, the green halo is rather inconspicuous
  • if the IDE background colour is black, the red halo is rather inconspicuous
Perhaps something could be done about that in some next version of the IDE?

Suggestions:

  • use a darker green against a white background, and a lighter red against a dark background
  • make the red halo flash

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.