User:Andrey.y.shevel

Metaprogramming is the term described the following objects. When we program large program system often we do find the need you need to be over subprogram/susbsystem where you can write global program with using subprogram/subsytem as elementary verbs/commands (let us refer it as E) for your higher programming. No matter how much data volume is involved in perform any of you elementary commands. Any elementary command is the conversion of the data. If you have several elementary commands you can write it down as:

E1

E2

E3

…

En

The sequence is performed in natural sequence (first E1, second E2, etc). Any elementary command can generate completion code (CC). We can go to different part of programming sequence depends on the CC – positive value (0, 1, 2, 3, ...). That means the whole program might be consists of linear part of sequence and command which does branch (conditional go to) depends on the CC value. Let us refer the conditional goto as CHECK where is some label for some line in above sequence. Obviously if CC is greater than number of operators CHECK, then GOTO performed to last CHECK (in example below to Name2) Let us take a look in another example: E1               E2                CHECK Name1		# goto label Name1 if CC=0 CHECK Name2		# goto label Name2 if CC=1 CHECK Name3		# goto label Name3 if CC=3 GOTO End		#  goto end of program Name1          E4                GOTO End Name2          E5 Name3           * End            END

Remember: each command is in reality might be quite complicated program system. The above sequence might be referred as metaprogram in contrast to conventional program.

It is not difficult to create simple interpreter which can perform subsytems E1, E2, E3 … and several operators CHECK (if required). It is not surprising if we refer such style of programming as metaprogramming. It is easy to image multilevel metaprogramming. We can consider one of commands (E1, E1, ..) as interpretator for another metaprogram of the same style. By the way, interpreter program might be exactly same but metaprograms are different.