Printer:-GetIncludes - get library inclusion statements
|
Calling Sequence
|
|
Printer:-GetIncludes()
|
|
Description
|
|
•
|
When called after the printing of intermediate code, the GetIncludes command returns a string containing the commands necessary for including all libraries or packages which have been declared necessary during the printing phase with AddLibrary calls.
|
•
|
The LibraryInclusion language attribute controls the formatting of the results returned by GetIncludes.
|
•
|
The GetIncludes command is frequently called by PrintTarget in order to preface the generated code with any necessary include directives.
|
|
|
Examples
|
|
>
|
|
>
|
LanguageDefinition[Define]("GetIncludesExample",
extend = "C",
AddFunction(
"show_libraries",
[anything]::anything,
proc()
Printer:-Print(
"printf(\"Library inclusion statements are: ",
Printer:-GetIncludes(), "\")"
)
end proc
)
):
|
>
|
|
a = sin(x);
b = printf("Library inclusion statements are: #include <math.h>
");
| |
|
|
Download Help Document
Copyright © MathResources Inc. All Rights Reserved.
www.mathresources.com