IModelling.Max_

Fore Syntax

Max_(A: String; B: String): String;

Fore.NET Syntax

Max_(A: string; B: string): string;

Parameters

A. First compared string.

B. Second compared string.

Description

The Max_ method returns maximum of the two strings by means of characterwise comparison.

Comments

Comparison is case-sensitive.

The function returns Null if at least one of the parameters is equal to Null.

To get minimum of the two strings, use the IModelling.Min_ method.

Fore Example

To execute the example, add a link to the Ms system assembly.

Sub UserProc;
Var
    Func: Modelling;
    res: String;
Begin
    Func := New Modelling.Create;
    res := Func.Max_("Apple""Banana");
    Debug.WriteLine("Max_(""" + "Apple" + """" +
        ", """ + "Banana" + """" + ") = " + res);
End Sub UserProc;

After executing the example the console window displays maximum string from the Apple and Banana strings.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub Main(Params: StartParams);
Var
    Func: IModelling;
    res: String;
Begin
    Func := New Modelling.Create();
    res := Func.Max_("Apple""Banana");
    System.Diagnostics.Debug.WriteLine("Max_(""" + "Apple" + """" +
        ", """ + "Banana" + """" + ") = " + res);
End Sub;

Example of Use in Expressions

Expression:

Max_("Apple", "Banana")

Result: Banana.

Expression 2:

Max_("Apple", "apple")

Result: apple.

Use: expressions can be used in model formulas of modeling container, in formulas of time series database calculated series, in formulas of the modeling container that is a child one for time series database in formula editor.

See also:

IModelling | Time Series Database: Calculator| Modeling Container: Editing Regressor or Formula | Expression Editor

See also:

IModelling