Code Generation - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Information : Updates : Maple 2017 : updates/Maple2017/CodeGeneration

Code Generation

The CodeGeneration package offers new support for translating Maple code to the Swift programming language.

Swift

With CodeGeneration[Swift], you can translate expressions to code fragments:

withCodeGeneration:

Swifta2+b2+c2

cg = sqrt(a * a + b * b + c * c)

 

You can also translate procedures and larger programs.

Swiftmaddi,i=1..m

func cg0 (m: Int32) -> Int32 {
  var r: Int32
  r = 0
  for i in 1...m
  {
    r = r + i
  }
  return(r);
}