Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim LL As LinkedList
Type KontaktStruct (Name As String,Strasse As String, Wohnort As String)
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim k1, n1, n2 As KontaktStruct
Dim k2 As KontaktStruct
Dim k3 As KontaktStruct
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
k1.Initialize
k1.Name = "Hans"
k1.Strasse = "Hansstr."
k1.Wohnort = "Hannove"
k2.Initialize
k2.Name = "Klaus"
k2.Strasse = "Aachenerstr."
k2.Wohnort = "Düren"
k3.Initialize
k3.Name = "Klaus2"
k3.Strasse = "Aachenerstr. 2"
k3.Wohnort = "Düren 2"
LL.Initialize
LL.Add(k1)
LL.Add(k2)
LL.Add(k3)
Log ("First = " & CRLF & LL.First & CRLF & " : Last = " & LL.Last & CRLF)
Log (ShowLL("All"))
n1 = LL.RemoveFirst
Log ("Removed first: " & CRLF & n1)
n2 = LL.RemoveLast
Log ("Removed last: " & CRLF & n2)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub ShowLL(title As String)
Dim msg As String
For i = 0 To LL.Size - 1
msg = msg & LL.Get(i) & CRLF
Next
Log (title & msg)
End Sub