The present invention generally relates to variable replacement apparatuses, and more particularly to a variable replacement apparatus which replaces a converting portion of a text (such as various kinds of define decks, documents and programs that include variables) with variable values converted into a specified format.
A variable replacement function is provided in a computer system. More particularly, a portion of an electronic text which is processed in the computer system is defined as a variable item, that is, as a variable. When actually using this variable portion, the variable portion is replaced by a content which is specified with respect to the variable. This content will hereinafter be referred to as a variable value.
For example, if a display which is made on a display unit by a program is defined as a display field define deck, the variables are described within the text of the display field define deck and the variables are replaced by necessary character strings or the like in order to arbitrarily change and use a portion of the display field define deck.
In such a computer system, it is desirable that the expression of the variables can be specified in a simple manner within the text.
FIG. 1 shows an example of a conventional conversion. It is assumed that the computer system exchanges data using variables. For example, a conversion part 81 replaces the content (variable value) of the variable which is managed by a variable management part 82, in response to an input 80 which includes the variable as shown in FIG. 1, and outputs the replaced data as an output result 83.
The variable of the input 80 is represented by a character string (variable name) which is added with a character "&" at the head. In this example, the variable name is "ABCDE". Conversion information &lt;L&gt; specifies the conversion format, and in this case, the conversion information &lt;L&gt; specifies that the content of the variable having the variable name "ABCDE" is converted into capital letters and regarded as the variable value. On the other hand, other conversion information includes conversion information &lt;1&gt; which specifies that only the first character of the variable, that is, the character string, is converted into a capital letter.
Based on the input 80 and the variable "ABCDE", the conversion part 81 obtains the content "value" of the variable "ABCDE" from the variable management part 82, and converts the content "value" into the capital letters "VALUE" depending on the conversion information &lt;L&gt;. The capital letters (variable value) "VALUE" are output as the output result 83.
Therefore, when converting the content of the variable into the variable value according to the conventional system, it is necessary to specify the conversion information as added information required for the conversion, in addition to the variable name required to obtain the variable value. For this reason, compared to the case where no conversion is required, there is a problem in that the method of specifying the variable is complicated. In addition, if various kinds of conversions are carried out, there is a problem in that the user must be aware of all of the different kinds of conversion information. Otherwise, the user would be unable to know the format to which each variable value will be converted. In other words, the user cannot simply look at the text to determine the variable names and various conversion information.