10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PreprocessorInclude ScriptsInclude scripts are scripts that contain 4GL code that you can includeanywhere in your frame, procedure, or user class script by using the #includestatement. This statement references an include script component in thecurrent or an included application.Your 4GL code block does not appear in the frame script until after the scripthas been processed. In the preprocessed version, you see only the #includestatement and the name of your script as described in The #include Statement(see page 434).You can use include scripts for:• Code sharing that cannot be accomplished by including the code in a calledprocedure or method—for example, blocks of code that include on eventstatements or conditions• Variable definitionThe #include StatementInclude scripts can exist in your current application or in any includedapplication. You create and edit include scripts in OpenROAD Workbench byusing the Include Script Editor. You can also display a list of include scripts foran application in the Components portlet of the Develop tab. For moreinformation about how to use this option, see the User <strong>Guide</strong>.The syntax for an include statement is:# include scriptnamescriptnameSpecifies the name of the include script you want to referenceUse an #include statement for each script of 4GL code you want to referencein a frame script. The 4GL code must not be in the file system, it must be inthe database.The # sign must begin in the first column. Spaces are not required betweenthe # sign and the rest of the statement. However, the number of whitespaces between "#" and "include" are prefixed to every line in the processedinclude script. For example, if you want to indent the included code by fourspaces, then enter the #include as "# include" (with three spaces followingthe #).The #include statement can be nested to a depth of 20.434 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!