RandomTools
GetFlavor
return the flavor definition
Calling Sequence
Parameters
Description
Examples
GetFlavor(flvr)
flvr
-
symbol; represents a flavor in the form of a procedure or module
The GetFlavor(flvr) function, where flvr specifies a flavor that is known to function Generate, returns the procedure or module that defines the behavior of the flavor.
If the flavor is not recognized by Generate, an exception is returned.
This function is part of the RandomTools package, and so it can be used in the form GetFlavor(..) 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[GetFlavor](..).
withRandomTools:
AddFlavorA=rand1..20:
GenerateA
15
GetFlavorA
procprocoptionbuiltin=RandNumberInterface;end proc6,20,5+1end proc
GetFlavorposint
procrange::posint ≔ 99999999989, $...end proc
GetFlavorinteger
modulelocalModuleApply,randIntExclude;exportMain;end module
memberA,GetFlavors
true
See Also
module
procedure
RandomTools[AddFlavor]
RandomTools[Generate]
RandomTools[GetFlavors]
RandomTools[HasFlavor]
RandomTools[RemoveFlavor]
Download Help Document