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](..).
with⁡RandomTools:
AddFlavor⁡A=rand⁡1..20:
Generate⁡A
15
GetFlavor⁡A
procprocoptionbuiltin=RandNumberInterface;end proc⁡6,20,5+1end proc
GetFlavor⁡posint
procrange::posint ≔ 99999999989, $...end proc
GetFlavor⁡integer
modulelocalModuleApply,randIntExclude;exportMain;end module
member⁡A,GetFlavors⁡
true
See Also
module
procedure
RandomTools[AddFlavor]
RandomTools[Generate]
RandomTools[GetFlavors]
RandomTools[HasFlavor]
RandomTools[RemoveFlavor]
Download Help Document