Definition Script

The PSCAD definition script language is used extensively in the design of component definitions.  It serves mainly as a communication interface between the designer and the application, providing instruction on how to incorporate a component into the greater project.  This communication occurs at compile time, when each definition segment is considered sequentially, and its script parsed into information meaningful to the compiler.

 

Although there are some segments that allow for the direct inclusion of source code (i.e. code that does not require parsing), such Fortran, DSDYN and DSOUT, exploiting definition script ensures that code source remain current, as well as compiler and language independent. Definition script is given the highest priority during the compilation process; it is considered first before any direct source code, and is consequently used in expression evaluation, substitutions, and for the provision of compiler directives.    

 

This chapter is closely linked with Component Design.  It is recommended that you familiarize yourself with both chapters before attempting to design your own component.  The following sections describe what scripting tools are available, and provide examples on how each can be used.   Component Design contains a tutorial on designing your own component.