Code Generation - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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);
}