Code : Tout sélectionner
NewList people.s()
AddElement(people()) : people() = "Tom"
AddElement(people()) : people() = "Dick"
AddElement(people()) : people() = "Harry"
AddElement(people()) : people() = "Bob"
FirstElement(people())
DeleteElement(people())
MessageRequester("Information", "First person in list is "+people(), #PB_MessageRequester_OK)
LastElement(people()) ; Moves to "Bob"
PreviousElement(people()) ; Moves to "Harry"
DeleteElement(people()) ; And deletes him. there is an element before Harry, so it becomes the current
MessageRequester("Information", "Current person in list is "+people(), #PB_MessageRequester_OK)
Code : Tout sélectionner
NewList people.s()
AddElement(people()) : people() = "Tom"
AddElement(people()) : people() = "Dick"
AddElement(people()) : people() = "Harry"
AddElement(people()) : people() = "Bob"
FirstElement(people())
DeleteElement(people())
FirstElement(people())
MessageRequester("Information", "First person in list is "+people(), #PB_MessageRequester_Ok)
LastElement(people()) ; Moves to "Bob"
PreviousElement(people()) ; Moves to "Harry"
DeleteElement(people()) ; And deletes him. there is an element before Harry, so it becomes the current
MessageRequester("Information", "Current person in list is "+people(), #PB_MessageRequester_Ok)