#1 2021-02-08 09:31

oem
Member
Registered: 2018-12-15
Posts: 9

Initialization of variables

Just a little confused as to which variable in pascal get shared between files?  ive been finding ive had to add   x := ''; to things sometimes as it would end up using old values

Offline

#2 2021-02-09 11:07

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Initialization of variables

All variables declared within the script level context will persist for the whole Preview operation and will be shared between executions of a script for each file.

The script level context is the root level var section, as opposed to local var sections within procedures and functions.

Here is a quick demo script of how to handle the initialization of variables:
https://www.den4b.com/wiki/ReNamer:Scripts:Initialize

Offline

Board footer

Powered by FluxBB