When VBLM builds an RSV app, it replaces strings with calls to a function that, passed an index argument, returns a string. VBLM allows considerable flexibility in how these string indices are sequenced and formatted. The options that control the process are accessed by clicking the String Indexing Method node on the Build window and include:
String Index Base and Step
These options control the numbering scheme used to generate string indices. The formula is Base + n * Step, where n is the 1-based string sequence number. If, for example, the base was set to 100 and the step to 10, the first string index would be 110, the second 120, then 130, 140, 150, etc.
Note: When using resources, VBLM will prompt you to set these to not use 1, which is reserved for the app's default icon.
String Index Insertion Style
This option controls the format VBLM will use to insert the index numbers in code. There are 3 possible settings:
Numeric Literal
With this setting (the default), VBLM inserts the index numbers as is, ie index 110 is inserted as 110, 120 as 120, etc.
Simple Constant
With this setting, VBLM inserts the index numbers as simple symbolic constants. Index 110 is inserted as SC0110, 120 as SC0120, etc.
Constant Built from Template
With this setting, VBLM inserts the index numbers as symbolic constants using the template specified below.
Note: When this setting is changed from the default Numeric Literal, VBLM generates a code file defining these constants and adds it to the project file. The default name of this file is VBLMCNST.BAS, but you can change it by editing the value assigned to the RSVConstantsFile key in the [BuildOptions] section of VBLM.INI.
String Index Template
When the String Index Insertion Style is set to Constant Built from Template, VBLM uses your entry here to construct constant names. It reproduces the entry literally, with the exception of 4 special entries:
%Index% or # are replaced with the index number formatted as a string
%String% is replaced with (up to) the first 40 characters of the string itself, with illegal naming chars (spaces, punctuation, etc) replaced with underscores. If the entry ends with L=n, where n is some number, VBLM uses (up to) the first n characters of each string, instead of 40.
Examples:
SC# or SC%Index% is the same as selecting Simple Constant.
MyConst%Index% would result in constants named MyConst110, MyConst120, etc.
SC_%String%_%Index% would result in constants named SC_This_Is_A_String_110, SC_This_Is_Another_String_120, etc.
Note: VBLM does not check for illegal duplication. Thus if you do not use %Index% or # in the template, you may end up with duplicate (and illegal) constant names.
Unified vs. Separate Constants File
This option only applies when a) the insertion style is set to Simple Constant or Constant from Template, and b) the LMP file is based on a project group (*.VBG) rather than a single project (*.VBP). When Unified is selected, VBLM builds a single constant file containing string index constants for all strings in all projects, and includes it in each project in the group. When Separate is selected, VBLM builds constant files for each project, each containing only string index constants for the subset of strings used by that project.
Note: When Separate is selected, VBLM enumerates the file names to differentiate them; VBLMCNST.BAS becomes VBLMCNST_1.BAS, VBLMCNST_2.BAS, etc.