10.2.2. Program StructureFirst, we note that there are three main sections to the program, as is typical of FLOPS programs. The first section is “Declarations”, in which the data structures (data elements in FLOPS) are defined. Next comes the “Rules” section, where we define our rules. After that comes the “Makes” section, in which the initial data are created by make commands or read from the blackboard by the transfer command. Finally, after everything is set up for the run, we issue a fairly long message to the user, followed by a run command. This sequence is not completely arbitrary. To write a rule, we must be able to refer to data, which in turn must be previously defined by declare commands.Finally, we cannot run the program and execute the rules unless at least some data have been created. The important fact that dictates that creation of rules must precede creation of data is that a rule, when first created, does not know about any data previously created. While this may seem capricious, in complex programs it permits isolating newer rules created during the program run from earlier and perhaps outmoded data.
đang được dịch, vui lòng đợi..
![](//viimg.ilovetranslation.com/pic/loading_3.gif?v=b9814dd30c1d7c59_8619)