ExternalTypeSignature

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

DetailsDetails

  • 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.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Create a cloud object:

In[1]:=
Click for copyable input
Out[1]=

Generate a complete Java file to call the cloud object that can be pasted into a Java project:

In[2]:=
Click for copyable input
Out[2]=

The types of arguments can often be deduced automatically. The return type must be specified explicitly:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2014
(10.0)