Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
Printer:-PrintTarget - print translated code
Calling Sequence
Printer:-PrintTarget(ic, digits, precision, func_precision, namelist)
Parameters
Printer
-
Printer module
ic
Intermediate Code expression
precision
symbol; precision of variables of numeric type
func_precision
symbol; precision of function arguments and return values
namelist
list; names appearing in intermediate code
Description
The PrintTarget command initiates printing of the Intermediate Code expression ic according to the printing rules previously defined for the module Printer. PrintTarget returns a string, which corresponds to the translated output.
In most cases, PrintTarget is called by the PrintTarget procedure of the language definition module containing this Printer, perhaps with some pre- or postprocessing. For example, in a language definition module m, the command m:-PrintTarget may call m:-Printer:-PrintTarget.
Examples
Note: The following defines a Fortran translator that converts the output of Printer:-PrintTarget all to uppercase.
UppercaseFortran77 := 'module() export Printer, PrintTarget; Printer := eval(LanguageDefinition[Get]("Fortran")):-Printer; PrintTarget := proc() StringTools[UpperCase](Printer:-PrintTarget(args)); end proc: end module':
p1 := proc() sin(x+y*z)+trunc(x); end proc:
doubleprecision function p1 () p1 = dsin(x + y * z) + dble(int(dint(x))) return end
DOUBLEPRECISION FUNCTION P1 () P1 = DSIN(X + Y * Z) + DBLE(INT(DINT(X))) RETURN END
See Also
LanguageModule, Printer
Download Help Document
Copyright © MathResources Inc. All Rights Reserved.
www.mathresources.com