\' Gambas class file
Private hdato As String
Property dato As String
Private hsiguiente As Nodo
Property siguiente As Nodo
Public Sub _new(dat As String, Optional prox As Nodo)
hdato = dat
hsiguiente = prox
End
Public Sub EnlaceHaciaAdelante(prox As Nodo)
hsiguiente = prox
End
Private Function dato_Read() As String
Return hdato
End
Private Sub dato_Write(Value As String)
hdato = Value
End
Private Function siguiente_Read() As Nodo
Return hsiguiente
End
Public Function VerLista() As String
Dim frutas As String
Dim un_nodo As Nodo
un_nodo = Me
While True
un_nodo = un_nodo.siguiente
If IsNull(un_nodo) Then
Break
Endif
frutas &= un_nodo.dato & "<br>"
Wend
Return frutas
End
Private Sub siguiente_Write(Value As Nodo)
hsiguiente = Value
End