GetFunctionSignature - Maple Help

Online Help

All Products    Maple    MapleSim

Printer

 GetFunctionSignature
 get list of type signatures for function

 Calling Sequence Printer:-GetFunctionSignature(fname)

Parameters

 Printer - Printer module fname - string; function name

Description

 • The GetFunctionSignature command returns a list of acceptable type signatures and precisions for a function fname.
 • An element of the list returned is itself a list, whose first operand is an accepted type signature for fname, and whose second is a set specifying the precision of this signature.
 • If fname has not been defined with the AddFunction command, then GetFunctionSignature returns the empty list.

Examples

 > $\mathrm{with}\left(\mathrm{CodeGeneration}\right):$
 > $\mathrm{Printer}≔\mathrm{LanguageDefinition}\left[\mathrm{DefaultPrinter}\right]\left(\right):$
 > $\mathrm{Printer}:-\mathrm{AddFunction}\left("sin",\left[\mathrm{numeric}\right]::\mathrm{numeric},"sin"\right)$
 $\left[{"sin"}{,}{\varnothing }\right]$ (1)
 > $\mathrm{Printer}:-\mathrm{AddFunction}\left("cos",\left[\mathrm{numeric}\right]::\mathrm{numeric},"cos"\right)$
 $\left[{"cos"}{,}{\varnothing }\right]$ (2)
 > $\mathrm{Printer}:-\mathrm{AddFunction}\left("tan",\left[\mathrm{numeric}\right]::\mathrm{numeric},"tan"\right)$
 $\left[{"tan"}{,}{\varnothing }\right]$ (3)
 > $\mathrm{Printer}:-\mathrm{AddFunction}\left("tan",\left[\mathrm{numeric},\mathrm{numeric}\right]::\mathrm{numeric},"tan"\right)$
 $\left[{"tan"}{,}{\varnothing }\right]$ (4)
 > $\mathrm{Printer}:-\mathrm{GetFunctionSignature}\left("cos"\right)$
 $\left[\left[\left[{\mathrm{numeric}}\right]{::}{\mathrm{numeric}}{,}\left\{{\mathrm{numeric}}{=}\left\{{\mathrm{double}}{,}{\mathrm{generic}}{,}{\mathrm{single}}\right\}\right\}{,}{\varnothing }\right]\right]$ (5)
 > $\mathrm{Printer}:-\mathrm{GetFunctionSignature}\left("tan"\right)$
 $\left[\left[\left[{\mathrm{numeric}}\right]{::}{\mathrm{numeric}}{,}\left\{{\mathrm{numeric}}{=}\left\{{\mathrm{double}}{,}{\mathrm{generic}}{,}{\mathrm{single}}\right\}\right\}{,}{\varnothing }\right]{,}\left[\left[{\mathrm{numeric}}{,}{\mathrm{numeric}}\right]{::}{\mathrm{numeric}}{,}\left\{{\mathrm{numeric}}{=}\left\{{\mathrm{double}}{,}{\mathrm{generic}}{,}{\mathrm{single}}\right\}\right\}{,}{\varnothing }\right]\right]$ (6)

 See Also