Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
Details of the CodeGeneration Package
Basic Information
This help page contains complete information about the CodeGeneration package. For basic information on the CodeGeneration package, see the CodeGeneration help page.
Description
The CodeGeneration package is a collection of commands and subpackages that enable the translation of Maple code to other languages. The exports of this package fall into two categories: translators to specific target languages and commands that allow the user to extend the translation facility.
The translators available are C, CSharp, Fortran, Java, Matlab and VisualBasic. For a description of options common to all these commands, see the CodeGenerationOptions help page. For a description of special features and limitations of the CodeGeneration package that are relevant to all these target languages, see the TranslationDetails help page.
Using the Translate command and the LanguageDefinition subpackage, you can extend the translation capabilities of the CodeGeneration package to new programming languages. For an overview of this process, see the LanguageDefinitionOverview help page.
Each command in the CodeGeneration package can be accessed by using either the long form or the short form of the command name in the command calling sequence. As the underlying implementation of the CodeGeneration package is a module, you can also use the form CodeGeneration:-command to access a command from the package. For more information, see the Module Members help page.
List of CodeGeneration Package Commands
The following is a list of available commands and subpackages.
C
CSharp
Fortran
IntermediateCode
Java
Matlab
Save
Translate
VisualBasic
To display the help page for a particular CodeGeneration command, see Getting Help with a Command in a Package.
Examples
Generate C code and declare variable types.
cg = x - 0.3e1 * (double) y * z;
Generate MATLAB(R) code where the output is a string.
Generate Fortran code and specify single precision for floating-point variables and constants.
f:= proc(x) return x^2; end proc:
real function f (x) real x f = x ** 2 return end
Generate Visual Basic code
s = 0.10E1 + x t = Log(s) * Exp(-x) r = Exp(-x) + x * t
See Also
CodeGenerationOptions, examples/CodeGeneration, LanguageDefinitionOverview, module, TranslationDetails, UsingPackages, with
Download Help Document