I know pragmas only affect the method they are in, but what about within the method?
A) Are they only effective from the point in the method they were set, or for the whole method (I have always assumed from that point onward but he docs don’t explicitly say that last I looked.)
B) If defined in an if block like this:
If usePragmas Then
#Pragma BackgroundTasks False
#Pragma BoundsChecking False
End if
are they:
only effective in that block
only if set in block, they are effective from that point onward
the if block ignored and they are set anyway
I always assumed 2 but again I just realized that might not be the case
in your case UsePragmas should still control whether the code that gets generated for those pragmas gets executed
#PRAGMAS were initially INTENDED to be “compile time” only but thats become less & less the case over the years so they can be traded much like any other code
They just generate code that switches the runtimes behaviour as opposed to normal dojo code which really doesnt have that ability