GetFlavor - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


RandomTools

  

GetFlavor

  

return the flavor definition

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

GetFlavor(flvr)

Parameters

flvr

-

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

Description

• 

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](..).

Examples

withRandomTools:

AddFlavorA=rand1..20:

GenerateA

15

(1)

GetFlavorA

procprocoptionbuiltin=RandNumberInterface;end proc6,20,5+1end proc

(2)

GetFlavorposint

procrange::posint99999999989, $...end proc

(3)

GetFlavorinteger

modulelocalModuleApply,randIntExclude;exportMain;end module

(4)

memberA,GetFlavors

true

(5)

See Also

module

procedure

RandomTools

RandomTools[AddFlavor]

RandomTools[Generate]

RandomTools[GetFlavors]

RandomTools[HasFlavor]

RandomTools[RemoveFlavor]