CodeGeneration[LanguageDefinition] - Maple Programming Help

Home : Support : Online Help : Programming : Code Generation Package : Language Definition : CodeGeneration/LanguageDefinition/ListLanguages

CodeGeneration[LanguageDefinition]

 ListLanguages
 list defined languages

 Calling Sequence CodeGeneration[LanguageDefinition][ListLanguages]()

Description

 • The ListLanguages command lists the names of all languages which have been defined for use by CodeGeneration, including built-in languages.
 • Once added with Add or Define, user-defined languages should appear in the list returned by ListLanguages.

Examples

Define a new language ListLanguagesExample with Define, and check that it now appears in the list of defined languages.

 > $\mathrm{with}\left(\mathrm{CodeGeneration}\right):$
 > $\mathrm{LanguageDefinition}[\mathrm{ListLanguages}]\left(\right)$
 $\left[{"C"}{,}{"CSharp"}{,}{"Fortran"}{,}{"Fortran77"}{,}{"Fortran95"}{,}{"IC"}{,}{"Java"}{,}{"JavaScript"}{,}{"Julia"}{,}{"KernelExtensionInternalUseOnly"}{,}{"Matlab"}{,}{"Perl"}{,}{"Python"}{,}{"R"}{,}{"VisualBasic"}{,}{"default"}\right]$ (1)
 > $\mathrm{LanguageDefinition}[\mathrm{Define}]\left("ListLanguagesExample",\mathrm{extend}="C",\mathrm{AddFunction}\left("sin",\left[\mathrm{anything}\right]::\mathrm{anything},"sin"\right),\mathrm{AddOperator}\left(\mathrm{Names}:-\mathrm{Assignment}=":="\right)\right):$$\mathrm{LanguageDefinition}[\mathrm{ListLanguages}]\left(\right)$
 $\left[{"C"}{,}{"CSharp"}{,}{"Fortran"}{,}{"Fortran77"}{,}{"Fortran95"}{,}{"IC"}{,}{"Java"}{,}{"JavaScript"}{,}{"Julia"}{,}{"KernelExtensionInternalUseOnly"}{,}{"ListLanguagesExample"}{,}{"Matlab"}{,}{"Perl"}{,}{"Python"}{,}{"R"}{,}{"VisualBasic"}{,}{"default"}\right]$ (2)