1

In a SmartPy smart contract, is there 'continue' or 'break' for loop?

When I use 'continue' for loop, an error occurred. 'Error: invalid syntax'

3
  • Could you share the contract? Oct 20, 2020 at 7:25
  • Which language are you using?
    – arvidj
    Oct 20, 2020 at 7:49
  • I'm using smartpy
    – MS.J
    Oct 20, 2020 at 8:10

1 Answer 1

1

There is no sp.continue or sp.break inside a sp.for at the moment. We may add that in the future.

Please keep in mind that iterating on non trivially small lists is usually a bad idea inside a smart contract.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.