Method for generating variable format code

PURPOSE: A method for generating a variable format code is provided to set up the length of each field included in a code variably by including information for defining the structure of the code in the code. CONSTITUTION: The total length of a code and the length of each field(130) forming the code are set up. When constructing the total length of the code and the length of each field, information(110) for designating the number of fields which form the code and information(120) for designating the length of each field.