RemoveFlavor - Maple Help

RandomTools

 RemoveFlavor
 remove a flavor template

 Calling Sequence RemoveFlavor(flvr)

Parameters

 flvr - symbol; represents a flavor in the form of a procedure or module

Description

 • The RemoveFlavor(flvr) removes the flavor specified by flvr from the list of flavors that function Generate recognizes.
 If the flavor is not known to function Generate, an exception is raised.
 • This function is part of the RandomTools package, and so it can be used in the form RemoveFlavor(..) only after executing the command with(RandomTools). However, it can always be accessed through the long form of the command by using the form RandomTools[RemoveFlavor](..).

Examples

 > $\mathrm{with}\left(\mathrm{RandomTools}\right):$
 > $\mathrm{Generate}\left(A\right)$
 > $\mathrm{AddFlavor}\left(A=\mathrm{rand}\left(1..20\right)\right)$
 ${\mathbf{proc}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{proc}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{option}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{builtin}}{=}{\mathrm{RandNumberInterface}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}{}\left({6}{,}{20}{,}{5}\right){+}{1}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (1)
 > $\mathrm{Generate}\left(A\right)$
 ${15}$ (2)
 > $\mathrm{Generate}\left(A\right)$
 ${13}$ (3)
 > $\mathrm{member}\left(A,\left[\mathrm{GetFlavors}\left(\right)\right]\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{RemoveFlavor}\left(A\right)$
 > $\mathrm{Generate}\left(A\right)$
 > $\mathrm{member}\left(A,\left[\mathrm{GetFlavors}\left(\right)\right]\right)$
 ${\mathrm{false}}$ (5)