Wolfram 语言与系统 10.0 (2014)|旧版文档

此为更早版本的 Wolfram 语言文档查看最新文档(版本11.2)


is an option for EmbedCode that gives rules specifying the mapping to external types in an embedded code.


  • ExternalTypeSignature->{{"var1"->"type1",},"rettype"} specifies that should be of external type , and that the return type for the whole function should be rettype.
  • ExternalTypeSignature->{{"type1","type2",},"rettype"} takes the n^(th) argument to be of type .
  • The are native types specified as they are named in the target language.
  • In many languages, possible external types include: , , .
  • The types of arguments can often be inferred from other data in APIFunction etc. where they appear. A type of Automatic will use the inferred form.
  • In languages where types are used, the return type typically has to be set explicitly.
  • ExternalTypeSignature->"rettype" specifies the return type, and if possible infers all argument types.
  • In languages with dynamic typing, or without types, types do not usually have to be set.