The for filter is like an if block, it calls inside a failure context.
If the function does not <transacts> then you can’t call it inside a failure context, it will tell you that :
This invocation calls a function that has the 'no_rollback' effect, which is not allowed by its context.(3512)
You have to workaround it, as the roadmap says, the no_rollback effect is meant to be removed
Using a <transacts> specifier should work, it does on my compiler though :
IncrementSomeVariable()<transacts>:int= # Please don't return void because you're using the returned value to assign the variable S
return 1
for(X := 1..5; S := IncrementSomeVariable(); X < 3):
X
I think my method works because the compiler allows for variable assignment as an exception so that you can have multiple statements next to each other inside if blocks / for filters.
But you might be right, if the assignment works then a void call should work too. I guess they’ll fix this with the no_rollback update