Purpose |
Executes a series of statements, each of which utilizes pre-defined source code. | ||||||||
Syntax |
PREFIX "source code" [additional statements] END PREFIX | ||||||||
Remarks |
PREFIX/END PREFIX statements enclose a set of statements, each of which has the same specified "source code" prepended. The "source code" (in languages which support it) is usually required to be the name of an object variable. However, in PowerBASIC, this definition has been expanded greatly to allow virtually any code to be used. This reduces repetitive typing and reduces the risk of typing errors. For example:
If the "source code" prefix refers to an object variable or a UDT structure variable, be sure it ends with a period (.) to reference members of that item. Otherwise, be sure it contains whole words. Just as with macros and line continuations, you cannot put half a word on one line, and half a word on another. For example, the following code is illegal and will generate an exception: PREFIX "PRI" NT #1, "Hello World" END PREFIX PREFIX/END PREFIX structures may not be nested. | ||||||||
See Also |