procbody - Maple Programming Help

Home : Support : Online Help : System : Libraries and Packages : Deprecated Packages and Commands : Deprecated commands : procbody(deprecated)

procbody

create a neutralized form'' of a procedure

 Calling Sequence procbody(procedure)

Parameters

 procedure - any Maple procedure

Description

 • Important: The procbody function has been deprecated.  Use the superseding functions ToInert and FromInert instead to translate between Maple expressions and the corresponding inert forms.
 • This routine creates a neutralized form'' of a Maple procedure.  This neutralized form'' can be examined, or modified in ways the original procedure cannot be.  This routine is probably more useful in writing other routines to manipulate procedures than for interactive use. The function procmake creates a procedure from a neutralized form''.
 • The neutralized form replaces statements, local variables, parameters, and some functions with neutral'' equivalents. These neutral forms are described in the help file for procmake.
 • Do not evaluate the neutral form'' since this will almost certainly corrupt it due to such expressions as Digits being changed into 10 .

Examples

Important: The procbody function has been deprecated.  Use the superseding functions ToInert and FromInert instead to translate between Maple expressions and the corresponding inert forms.

 > a := proc(x) if x<0 then -x^2 else x^2 end if end proc:
 > $\mathrm{procbody}\left(a\right)$
 ${\mathrm{&proc}}{}\left({\mathrm{&expseq}}{}\left({x}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&if}}{}\left({{\mathrm{&args}}}_{{1}}{<}{0}{,}{-}{{\mathrm{&args}}}_{{1}}^{{2}}{,}{{\mathrm{&args}}}_{{1}}^{{2}}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&binary}}{}\left({1}\right)\right)$ (1)
 > b := proc(x) local a; for a in x do print(a) end do; a; end proc:
 > $\mathrm{procbody}\left(b\right)$
 ${\mathrm{&proc}}{}\left({\mathrm{&expseq}}{}\left({x}\right){,}{\mathrm{&expseq}}{}\left({a}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}\left({\mathrm{&for}}{}\left({{\mathrm{&local}}}_{{1}}{,}{{\mathrm{&args}}}_{{1}}{,}{\mathrm{true}}{,}{\mathrm{print}}{&function}\left({\mathrm{&expseq}}{}\left({{\mathrm{&local}}}_{{1}}\right)\right)\right)\right){&statseq}\left({{\mathrm{&local}}}_{{1}}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&expseq}}{}\left({}\right){,}{\mathrm{&binary}}{}\left({1}\right)\right)$ (2)