Support Statement: gmBasic Script Parameter Replacement

gmStudio does not currently do parameter replacement in script includes.

However, gmBasic does do parameter replacement on its variables, and there are a lot of these including a handful of variables specifically defined for consistency with gmStudio.

For example, Listing 1 is the set of system attributes that can be set in script Select commands. Once set, the values can be used in include files using the (%= attribute%) notation.

For example, in the main script:

<Select Srcname=”%Srcname%”/>

and in an include file

<Fix host="(%= SrcName%).gmTraceLogger" name="PostEdit_tracelogger">
<Replace name="rename trace logger file">
<OldBlock><![CDATA[gmTraceLogger_vb6.log]]></OldBlock>
<NewBlock><![CDATA[gmTraceLogger_net.log]]></NewBlock>
</Replace>
</Fix>

Listing 1: Select Attributes from gmsLang.xml (November 13, 2015)

<Class id="Select" >
<Attribute id="Name" type="string[64]" EditString="on" />
<Attribute id="ToolName" type="string[64]" location="Name" />
<Attribute id="Version" type="string[32]" EditString="on" />
<Attribute id="Company" type="string[64]" EditString="on"/>
<Attribute id="Id" type="string[32]" />
<Attribute id="Codesize" type="Integer" />
<Attribute id="Progress" type="Integer" />
<Attribute id="Echo" type="EchoType" />
<Attribute id="Dialect" type="Dialects" />
<Attribute id="SubSystem" type="Dialects" />
<Attribute id="SubSystem2" type="Dialects" />
<Attribute id="SubSystem3" type="Dialects" />
<Attribute id="SubSystem4" type="Dialects" />
<Attribute id="SubSystem5" type="Dialects" />
<Attribute id="flagsGmsl1" type="boolean[1]" />
<Attribute id="flagsGmsl2" type="boolean[2]" />
<Attribute id="flagsGmsl3" type="boolean[3]" />
<Attribute id="flagsGmsl4" type="boolean[4]" />
<Attribute id="TypeInteger" type="FixedType" />
<Attribute id="TypeLong" type="FixedType" />
<Attribute id="Indent" type="Integer" />
<Attribute id="BlockComments" type="Boolean" />
<Attribute id="BlockMethods" type="Integer" />
<Attribute id="Exceptionhandling" type="ExceptionType" />
<Attribute id="CheckDeclares" type="CheckDeclarationType" />
<Attribute id="CheckUUIDs" type="boolean" />
<Attribute id="Undefinedproperties" type="ProcessingStatus" />
<Attribute id="ShowReferences" type="boolean" />
<Attribute id="SortReferences" type="boolean" />
<Attribute id="LibrariesOnly" type="boolean" />
<Attribute id="MissingRef" type="MissingType" />
<Attribute id="DeleteUnused" type="boolean[1]" />
<Attribute id="UseOverload" type="boolean[2]" />
<Attribute id="StructExtern" type="boolean[3]" />
<Attribute id="SyntaxFatal" type="boolean[4]" />
<Attribute id="UseZeroBased" type="boolean[5]" />
<Attribute id="SingleQuotes" type="boolean[6]" />
<Attribute id="NullOrEmpty" type="boolean[7]" />
<Attribute id="IssueWarnings" type="boolean[8]" />
<Attribute id="IgnoreWin32" type="boolean[9]" />
<Attribute id="OptionalArguments" type="boolean[10]" />
<Attribute id="AcceptByRef" type="boolean[11]" />
<Attribute id="UseHexConstants" type="boolean[12]" />
<Attribute id="UseInterfaces" type="boolean[13]" />
<Attribute id="AcceptRedefine" type="boolean[14]" />
<Attribute id="DesignCode" type="boolean[15]" />
<Attribute id="ShowChanges" type="boolean[16]" />
<Attribute id="WebApplication" type="boolean[17]" />
<Attribute id="CheckMultiSet" type="boolean[18]" />
<Attribute id="RemoveByRef" type="boolean[19]" />
<Attribute id="CodeCommentOut" type="boolean[20]" />
<Attribute id="OmitResxData" type="boolean[21]" />
<Attribute id="NotUsed22" type="boolean[22]" />
<Attribute id="CompilerWarnings" type="boolean[23]" />
<Attribute id="SupplyMissingResx" type="boolean[24]" />
<Attribute id="OmitOcxState" type="boolean[25]" />
<Attribute id="TypeInference" type="boolean[26]" />
<Attribute id="RuntimeConditional" type="boolean[27]" />
<Attribute id="AspCodeClass" type="boolean[28]" />
<Attribute id="MarkupCodeClass" type="boolean[29]" />
<Attribute id="UseLocalMemory" type="boolean[30]" />
<Attribute id="AuthorLibrary" type="AuthorLibType" />
<Attribute id="LateBindings" type="ProcessingStatus" />
<Attribute id="Undefinedvariables" type="ProcessingStatus" />
<Attribute id="BuildFile" type="BuildFileStatus" />
<Attribute id="Sourcecount" type="Integer" />
<Attribute id="MaxOutputWidth" type="Integer" />
<Attribute id="Reserved1" type="boolean[1]" />
<Attribute id="Migrate2" type="boolean[2]" />
<Attribute id="UsesInterfaces" type="boolean[3]" />
<Attribute id="SharedFile" type="boolean[4]" />
<Attribute id="AddDefaultProperties" type="boolean[5]" />
<Attribute id="OmitAppObjects" type="boolean[6]" />
<Attribute id="UseUserControls" type="boolean[7]" />
<Attribute id="ShowVerticalLists" type="boolean[8]" />
<Attribute id="ProjectReference" type="boolean[9]" />
<Attribute id="MigrationSupportUI" type="boolean[10]" />
<Attribute id="SuppressNumericEncoding" type="boolean[11]" />
<Attribute id="CheckFinalCode" type="boolean[12]" />
<Attribute id="TraceCalls" type="boolean[13]" />
<Attribute id="EchoInput" type="boolean[14]" />
<Attribute id="LitmusTests" type="boolean[15]" />
<Attribute id="TraceChanges" type="boolean[16]" />
<Attribute id="EchoTranslation" type="boolean[17]" />
<Attribute id="EchoRaw" type="boolean[18]" />
<Attribute id="EchoStubs" type="boolean[19]" />
<Attribute id="EchoFixes" type="boolean[20]" />
<Attribute id="ASPNETCompiler" type="Boolean[21]" />
<Attribute id="LinearizeFiles" type="Boolean[22]" />
<Attribute id="Reserved2" type="Boolean[23]" />
<Attribute id="UseDoublePrecision" type="Boolean[24]" />
<Attribute id="CheckMultipleTypes" type="Boolean[25]" />
<Attribute id="InternalTestFlag" type="Boolean[26]" />
<Attribute id="Target" type="string[256]" />
<Attribute id="UserFolder" type="string[256]" location="Target" />
<Attribute id="System" type="string[256]" />
<Attribute id="IdfFromIdlFolder" type="string[256]" location="System" />
<Attribute id="Language" type="string[256]" />
<Attribute id="Local" type="string[256]" />
<Attribute id="IdfFromCodeFolder" type="string[256]" location="Local" />
<Attribute id="VirtualRoot" type="string[256]" stringOff="on" />
<Attribute id="Library" type="string[256]" stringOff="on" />
<Attribute id="GenExternFolder" type="string[256]" stringOff="on" location="Library" />
<Attribute id="DevEnv" type="string[64]" />
<Attribute id="Idl" type="string[256]" />
<Attribute id="RootSpace" type="string[64]" stringOff="On" />
<Attribute id="AppNameSpace" type="string[64]" stringOff="On" />
<Attribute id="DeployLocation" type="string[256]" stringOff="on" />
<Attribute id="NetProjFolder" type="string[256]" stringOff="on" location="DeployLocation" />
<Attribute id="ComputeConditional" type="string[256]" stringOn="on" stringOff="on" />
<Attribute id="RuntimeDlls" type="string[256]" stringOff="on" />
<Attribute id="environmentFile" type="string[256]" />
<Attribute id="JobId" type="string[128]" />
<Attribute id="SrcPath" type="string[256]" />
<Attribute id="SrcName" type="string[64]" />
<Attribute id="BndPath" type="string[256]" />
<Attribute id="GlobalSettings" type="string[256]" />
</Class>