Passing variables to included script

What are the exact settings I need to apply to variables for them to be accepted into an included script?

Right now I’ve got a list iterator which updates a temporary variables _Foo and for each iteration a call is made to an external build file, setting the variable Foo=%_Foo%. The variable doesn’t catch however and the default value in the included project is always used. The log shows that Foo is set to the correct value upon calling the included script, but the expansion is wrong.

Variables are not shared and I’ve tried making variables macros (reevaluate on each reference) and not, but it doesn’t work. If I pass the variable on the commandline to the included script it works just fine, apart from not passing variables to the environment when running external commands, even if they are marked as such.

What am I doing wrong?

Apparently, logging all the variables once, improves things slightly, but not all the way. Here’s an example output. Everywhere it says “Debug”, it should have said “Release”, since that’s what I pass to the script. The project variable BuildConfig defaults to Debug.

C:\Work\ws\betstone-main-axl\Code>fbcmd /tl /p…\Common\Bin\DeployDebugSymbols.fbp5 /vBuildConfig=Release /b

Variable [BuildConfig] set to [Release]

Project File: C:\Work\ws\betstone-main-axl\Common\Bin\DeployDebugSymbols.fbp5

Build Started: 2007-02-16 11:33:07


  [Start ActionList: Main]

  [Log Variable Values]
  Current variable values :
  BuildConfig = Debug
  ProductName = Not set
  ProductVersion = 1.0.0.0
  SRCSRV_SOURCE = C:\Work\ws\betstone-main-axl\Code
  SRCSRV_SYMBOLS = C:\Work\ws\betstone-main-axl\Local\Bin\Debug
  SRCSRV_SYSTEM = p4
  SYMBOLSERVER = \Halo\Symbols
  SYMSTORE_COMMENT =
  SYMSTORE_DIR = C:\Work\ws\betstone-main-axl\Local\Bin\Debug
  SYMSTORE_FILES = .
  SYMSTORE_LOGFILE = C:\Work\ws\betstone-main-axl\symstore.log
  SYMSTORE_PRODUCT = Not set
  SYMSTORE_STORE = \Halo\Symbols
  SYMSTORE_VERSION = 1.0.0.0

Conclusion: If a variable is set to reevaluate itself on each reference (macro), the default value will be reassigned on first use even if another value has been given as a parameter.

/axl - Almost weekend