Please enable JavaScript to view this site.

IBM® SPSS® Amos™ 28

The following program uses NextSeed to obtain a random number seed and then displays ten random numbers from a standard normal distribution. The random number seed will be saved in the CAmosSeedManager history log with the date and time and with the identifying string "My Program".

Imports System.Diagnostics
Module MainModule
    Sub Main()
        Dim SeedManager As New PAmosSeedManager3.CAmosSeedManager3
        Dim ARand As New AMOSRANDOMLib6.AmosRanGen
        Dim Seed As Integer
        Seed = SeedManager.NextSeed("My Program")
        Call ARand.Initialize(Seed)
 
        Dim i As Long
        For i = 1 To 10
            Debug.WriteLine(ARand.NextNormal)
        Next
    End Sub
End Module

© 2021 Amos Development Corporation