Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Gambas class file
- Private formatos As CreaLetra[]
- Private creados As Integer
- Public Sub _new()
- formatos = New Formato[]
- creados = 0
- End
- Public Function getCreados() As Integer
- Return creados
- End
- Public Sub setCreados(c As Integer)
- creados = c
- End
- Public Function getFormato(tipo As String, tam As Integer) As CreaLetra
- Dim tmp As CreaLetra
- Dim i As Integer
- tmp = New Formato(tipo, tam)
- If getcreados() > 0 Then
- For i = 0 To creados - 1
- If tmp.equals(formatos[i]) Then Return formatos[i]
- Next
- Endif
- 'nuevo formato detectado... se le añade a la lista de formatos
- formatos.Add(tmp)
- creados += 1
- Return tmp
- End
- Public Sub listaFormatos()
- Dim a As Integer
- For a = 0 To formatos.count - 1
- formatos[a].Describe
- Next
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement