CodeGeneration[LanguageDefinition][DefaultPrinter] - get generic printing module
|
Calling Sequence
|
|
CodeGeneration[LanguageDefinition][DefaultPrinter]()
|
|
Description
|
|
•
|
The DefaultPrinter function returns a Printer module that may be used to encode the instructions necessary to translate CodeGeneration's Intermediate Code structure.
|
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
| (1) |
>
|
moddef := 'module()
export Printer, PrintTarget;
Printer := LanguageDefinition[DefaultPrinter]();
PrintTarget := proc() Printer:-PrintTarget(args); end proc:
Printer:-AddFunction("cos", [numeric]::numeric, "MyCosine");
Printer:-AddOperator(Names:-Assignment = "assigned to");
Printer:-AddOperator(Names:-Addition = "plus");
end module':
|
>
|
|
>
|
|
|
|
Download Help Document
Copyright © MathResources Inc. All Rights Reserved.
www.mathresources.com
Was this information helpful?