View Single Post
Old 02-19-2021, 12:17 PM   #344
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,204
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by compurandom View Post
Is there a reason to clear all the variables every time? Why not just leave them there, and if a chain wants to zero out totals before starting, it should be able to set them all at the start of the chain.

Is that too messy?
The variables are not cleared. Every chain runs in a loop of its own, that is garbage collected as soon as the chain ends.

I think as chaley pointed out, it is better not to persist variables because you are going to run into scope problems.

However, the user has the option to persist some variables before exiting the chain. This can be done by creating and empty book and calling it something like 'persistent storage'. You can persist whatever data you want into this book, by using the selection modifier to select it, then the single field edit template option to persist.
capink is offline   Reply With Quote