IModelling.ASCII

Fore Syntax

ASCII(Str: String): Integer;

Fore.NET Syntax

ASCII(Str: string): integer;

Parameters

Str. The string, for which it is required to get ASCII code of the first character.

Description

The ASCII method returns ASCII code for the first string character.

Comments

To get a character that corresponds to ASCII code, use the IModelling.Char method.

Fore Example

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

Sub UserProc;
Var
    Func: Modelling;
    n: Integer;
Begin
    Func := New Modelling.Create;
    n := Func.ASCII("String");
    Debug.WriteLine("ASCII(""" + "String" + """" + ") = " + n.ToString);
End Sub UserProc;

After executing the example the console window displays ASCII code of the first character in the String string.

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;
    n: Integer;
Begin
    Func := New ModellingClass.Create();
    n := Func.ASCII("String");
    System.Diagnostics.Debug.WriteLine("ASCII(""" + "String" + """" + ") = " + n.ToString());
End Sub;

Example of Use in Expressions

Expression:

ASCII("String")

Result: 83.

Expression 2:

ASCII("a")

Result: 97.

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