More strange behaviour by the .Initialize procedure

As a result of some inept copying and pasting, I had this line of code in my .Initialize procedure:

jdOpenWindows = arraystrip(arrayfilter(jdOpenWindows,cr(),{?(import() contains "singleinvoice" or contains "newinvoice","",import())}),cr())

You can see that I omitted an import() reference. Nevertheless, the procedure compiled OK and then stopped at the error with no error message. An if error construct did reveal an error.

Since the formula is quoted, it’s just a string of text as far as the compiler is concerned. Only the arrayfilter( function itself knows there is a formula between those braces, and it won’t see it until the statement runs. Jim explained the lack of error message elsewhere.

I take your point but the compiler and the function are both components of Panorama X, so it’s not a giant step for the compiler to recognise that a string in that location should be a formula and then to test the syntax of said formula.

I’m not hassling Jim to fix it any time soon but I reckon it shouldn’t compile.

I think we had this EXACT same discussion a couple of months ago. As I recall (I’m too lazy to look it up right now) Dave provided an excellent explanation of why Panorama doesn’t detect these errors at compile time, which he has more or less repeated here. While what Michael’s suggestion is technically possible, it would be incredibly complicated to implement (you are completely mistaken about it not being a giant step, it would be a humongous step, possibly months of work), and would still leave many possible undetectible errors. Bottom line, Panorama is never ever going to do this, and I’m not even going to add this to the bug list.

My humblest apologies.