| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== PRAGMA (control pragma settings from source) ====== | [[post post user defined event .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[press put characters in the buffer .htm|{{btn_next_n.gif|Next page}}]] | | || **PRAGMA(**//string//**)** {{blk2blue.jpg|blk2blue.jpg}} | **PRAGMA** | Send to the project system a statement from your generated source code | | //string// | A string constant, variable, or expression, of the format '//project(string)//', '//compile(string)//', or '//link(string)//'. | | | PRAGMA('project(string)') | | | Supports the use of the project system's statements in Clarion source code, and adds the statement to the project dynamically. The string parameter defines the proper project syntax. | | | Any valid [[soft velocity pragmas.htm|pragma statement]] (e.g., CALL, DATA, DEFINE, etc.) can be used. | | | PRAGMA('compile(string)') | | | Equivalent to PRAGMA('project(#compile string)') | | | PRAGMA('link(string)') | | | Equivalent to PRAGMA('project(#pragma link(string))') | **PRAGMA** supports the use of the project system's pragma statement in Clarion source code, and adds the pragma to the project dynamically. The //string// parameter defines the proper project syntax. Generally, the **PRAGMA** setting is in effect until the end of the source module where it was used. If the **PRAGMA** statement was used in the data section of a program's main module, it is working for all of the non-generic MEMBER source modules of the program. **Examples:** **        PROGRAM** **        MAP** **         INCLUDE('MYUTIL.INC')** **        END** ** ****PRAGMA****('project(#compile MYUTIL.CLW)')** ** ****PRAGMA****('project(#pragma link(C%V%DOS%X%%L%.LIB))')** **F FILE,DRIVER('DOS'),CREATE,NAME('Test.!')** **Record RECORD** **        BYTE,DIM(1000)** **       END** **  END** ** CODE** ** CREATE (F)** In the above example, the project **pragma** forces the system to compile MYUTIL.CLW, and automatically adds the correct DOS driver library to the link list. **   PROGRAM** **    MAP** **     INCLUDE('MYUTIL.INC')** **    END** ** ****PRAGMA****('compile(MYUTIL.CLW)')** ** ****PRAGMA****('link(C%V%DOS%X%%L%.LIB)')** **F      FILE,DRIVER('DOS'),CREATE,NAME('Test.!')** **Record  RECORD** **         BYTE,DIM(1000)** **        END** **       END** ** CODE** ** CREATE(F)** The above example is identical in function to the first example. **See Also:** [[project system macros.htm|Project System Macros]]