MapleUserInfo - Maple Programming Help

Home : Support : Online Help : Programming : OpenMaple : C Application Programming Interface : Output : OpenMaple/C/MapleUserInfo

MapleUserInfo

print useful information to the user in external code

 Calling Sequence MapleUserInfo(kv, level, name, msg)

Parameters

 kv - kernel handle of type MKernelVector level - non-negative integer name - procedure name msg - message to be displayed

Description

 • This function can be used in external code with OpenMaple or define_external.
 • MapleUserInfo displays information relevant to the procedure being executed.  This command is equivalent to the userinfo command.  Information is displayed when infolevel[fn] = level, or infolevel[all] = level.

Examples

 #include "maplec.h" ALGEB M_DECL MyFrontEnd( MKernelVector kv, ALGEB *args ) { ALGEB msg; msg = MapleALGEB_SPrintf(kv,"entered with %a",args); MapleUserInfo(kv,3,"MyFrontEnd",MapleToString(kv,msg)); return( ToMapleNULL(kv) ); }

Execute the external function from Maple.

 > $\mathrm{with}\left(\mathrm{ExternalCalling}\right):$
 > $\mathrm{dll}≔\mathrm{ExternalLibraryName}\left("HelpExamples"\right):$
 > $\mathrm{ui}≔\mathrm{DefineExternal}\left("MyFrontEnd",\mathrm{dll}\right):$
 > $\mathrm{ui}\left(1,2\right)$
 > ${\mathrm{infolevel}}_{\mathrm{MyFrontEnd}}≔3:$
 > $\mathrm{ui}\left(1,2\right)$
 ui:   "entered with [1, 2]"