diff --git a/tconfpy.3 b/tconfpy.3 index 2b35059..ce8774d 100644 --- a/tconfpy.3 +++ b/tconfpy.3 @@ -565,6 +565,23 @@ .B string \fC"6.023"\fP on the Right Hand Side. +Similarly, variables are coerced as strings when they are referenced +in substitutions: + +.ft C \" Courier +.nf + # Assume 'myfloat' has been predefined to be a floating point variable + # Assume 'mybool' has been predefined to be a boolean variable + + myfloat = 3.14 + mybool = True + + myvar = [myfloat] is [mybool] + + # This sets 'myvar' to the string '3.14 is True' +.fi +.ft \" revert + This can be tricky when dealing with Boolean variables. As described later in this document, you can do conditional tests based on the .B state @@ -592,7 +609,7 @@ .ft \" revert Where, \fCMYCONTROL\fP is a regular old string variable - i.e., It has not -been defined to be a boolean by either a Template or Initial Symbol table +been defined to be a Boolean by either a Template or Initial Symbol table passed to the parser. .TP @@ -606,6 +623,24 @@ It is provided as a convenience so that the calling program can easily "reset" every variable to its default value if desired. +The one place \fCVarDescriptor.Default\fP is used within the parser is when +using Variable Templates. Suppose a \fCFoo\fP is a templated variable and the +configuration file contains the statement: + +.ft C \" Courier +.nf + Foo = +.fi +.ft \" revert + +This will reset the templated variable to its +.B default +value. This is unlike the case of a "normal" variable where such +a statement sets it to a null string - literally the Right Hand Side +contains nothing in this case. The section entitled, +.B Using Variable Templates +discusses the rationale' for these semantics. + .TP .B VarDescriptor.LegalVals (Default: \fC[]\fP) @@ -2243,10 +2278,10 @@ .SS Some Further Notes On Boolean Variables One last note here concerns Boolean variables. Booleans are actually -stored in the symbol table as the Python boolean values, \fCTrue\fP or +stored in the symbol table as the Python Boolean values, \fCTrue\fP or \fCFalse\fP. However, \fCtconfpy\fP accepts user statements that set the value of the -boolean in a number of formats: +Boolean in a number of formats: .ft C \" Courier .nf @@ -2267,7 +2302,7 @@ .B NOTE HOWEVER: If the user wants to do a conditional test on the value of -a boolean they +a Boolean they .B must observe case and test for either \fCTrue\fP or \fCFalse\fP: @@ -3201,4 +3236,4 @@ .ft \" revert .SH DOCUMENT REVISION INFORMATION -$Id: tconfpy.3,v 1.152 2005/01/19 08:31:33 tundra Exp $ +$Id: tconfpy.3,v 1.153 2005/01/19 09:15:10 tundra Exp $