This example demonstrates the ParameterNumber method.
Imports System.Diagnostics
Module MainModule
' ParameterNumber Method Example
Sub Main()
Dim Sem As New AmosEngineLib.AmosEngine
Dim i As Integer
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Grnt_fem")
Sem.AStructure("visperc = (1) spatial + (1) err_v")
Sem.AStructure("cubes = (a) spatial + (1) err_c")
Sem.AStructure("lozenges = (b) spatial + (1) err_l")
Sem.AStructure("paragraph = (1) verbal + (1) err_p")
Sem.AStructure("sentence = (c) verbal + (1) err_s")
Sem.AStructure("wordmean = (d) verbal + (1) err_w")
Debug.WriteLine("There are " & Sem.NumberOfParameters & " parameters")
Debug.WriteLine("The 3rd parameter is called " & Sem.ParameterName(3))
Debug.WriteLine("'a' is parameter number " & Sem.ParameterNumber("a"))
Debug.WriteLine("The value of 'a' is " & Sem.ParameterValue("a"))
Debug.WriteLine("The value of the 3rd parameter is " & Sem.ParameterValue(3))
Sem.Dispose()
End Sub
End Module