Variables are stored in a python dictionary keyed on the variable name. Variable tags are stored in thhe same way, but in a second dictionary. Dictionaries provive an exceedingly fast and convenient way to access variables. There is also a 'global.0' VIC used to store that variables that are defined outside of a VIC instance. For all intents and purposes this is a normal VIC, except it does not appear in the normal VIC lists/instances, and is only accessed for global-variable operations. When variable substitution is performed, the variable is first searched for in the table from the current VIC. If none is found then the global variable table is searched. If the variable is still undefined it is transposed with an empty string. If there is no currently focused VIC, then only the global table is searched. 'Standard' unix shell syntax is used for variables (extending the VIC definition). This allows $var_name and \$var_name, but also the use of '{' and '}' to delimit a variable name when it's embedded within another string. For example a user may wish to use a variable in the manner: oi -c colour "red" ... $colour_colouring Normally the interpreter would see a variable called "colour_colouring" which would be undefined and resolve to "". So we allow the syntax: oi -c colour "green" ... ${colour}_colouring Which allows the user to perform this style of operation, which would be impossible otherwise. The interpreter is quite 'error-flexible' with respect to end-of-line termination and other oddities. If the above command ended with "${colour" (i.e. missing the right bracket) it will still be subsituted. Also things like '$$$' do not cause a problem. Although it's impossible to defined a variable with no name, this string is simply processed as 3 (undefined) variables in a row and resolves to an empty string. I'm a bit concerned about the usability of variables stored in files. For starters this is quite slow, and cannot save memory since to resolve a variable the content must be copied (into memory) anyway. I guess in the medium term it saves memory then, with short burts of high-use. Input into variables is handled my the 'input.py' module. It defines a limit that determines when a variable's content will be written out to file. According to the OI docs, this should be 255 bytes, I have it set to 64k. I'm not quite sure how variable files should be handled when variables are changed and/or deleted. I have implemented it in such a way that the file exists only with the variable, and if the variable is changed/deleted then so does the file. Input to variables from stdin may proove to be a bit tricky. I would like to have coded this so that the user can enter text as much as they like, and then finish with whatever their OS uses to denote End-Of-File (^D on Unix, ^Z on OS/2, DOS, Windows). Under Linux this seems to work ok. However I'm expecting that it may be problematic on other systems. To this end, I have also implemented a function that uses a single period on a line to denote end. This is the same as what mail and usenet-news transport agents use to denote end-of-message, so it's a little bit standard. Both functions are included in input.py, the read-to-EOF version is wired-in by default.