MaxMethod

Applies to:uCalc Transform
Class:uCalc.uCalcTransform.RuleClass
Sets the maximum number of matches of this rule allowed
Syntax
Max(Value)
Parameters
Value
Int32
Maximum number of matches of this rule allowed
Returns
Type: RuleClass
Sets the maximum number of matches of this rule allowed
Remarks
This sets the maximum number of individual matches that this rule should find in order for any matches of this rule to count. If more than this number of matches are found in the text, then none of the matches in this rule will count. For instance if a rule searches for matches of "a" in "a a r d v a r k", and the maximum is set to 2, then no matches of "a" will be counted at all, because there are more than 2 occurences of "a" in the text. On the other hand, if Max is set to 3 or 4 or any larger value, then all the matches would count.

The default Max value is -1, which is the equivalent of no maximum limit.

If you want to stop counting after a given number of matches of a rule, without invalidating the matches that were already found, use StopAfter instead.

DLL import code
<DllImport(uCalcDLL, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl, EntryPoint:="Max")> _

Private Function Max__(ByVal RuleHandle As IntPtr,ByVal Value As Int32) As IntPtr
End Function
            
[DllImport(uCalcDLL, CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl, EntryPoint="Max")]

protected static extern IntPtr Max_(IntPtr RuleHandle, Int32 Value);
            
{DLLImport}function Max__(RuleHandle: System.Pointer;Value: Int32): System.Pointer; cdecl; external uCalcDLL name 'Max';

            
typedef uCalcPtr (* __Max)(void *RuleHandle, int32_t Value); 

            
[DllImport(uCalcLib, CharSet=CharSet::Ansi, CallingConvention=CallingConvention::Cdecl, EntryPoint = "Max")]

static uCalcPtr Max_(void *  RuleHandle, Int32 Value);
            
See also
Prev | Next