Advertisement
jsbsan

formato

Dec 10th, 2013
1,244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.75 KB | None | 0 0
  1. ' Gambas class file
  2.  
  3. Inherits CreaLetra
  4. Private tipo As String
  5. Private tamano As Integer
  6.  
  7. Public Sub _new(tip As String, TamanoNumero As Integer)
  8.  
  9.   tipo = tip
  10.   tamano = TamanoNumero
  11.  
  12.  
  13. End
  14.  
  15.  
  16. Public Sub asignaLetra(l As Letra)
  17.  
  18.   Print "Asignación.....Tipo de letra " & tipo & " con tamaño: " & Str$(tamano) & " para el texto: ", l.getTexto()
  19.  
  20. End
  21.  
  22. Public Function equals(obj As Object) As Boolean
  23.  
  24.     Return (tipo = obj.getTipo()) And (tamano = obj.getTamano())
  25.    
  26.  
  27.  
  28. End
  29.  
  30.  
  31. Public Function getTipo() As String
  32.  
  33.   Return tipo
  34.  
  35. End
  36.  
  37.  
  38. Public Function getTamano() As Integer
  39.  
  40.   Return tamano
  41.  
  42. End
  43.  
  44.  
  45. Public Sub Describe()
  46.  
  47.   Print "Formato: tipo de letra: ", tipo, " con tamaño: ", tamano
  48.  
  49. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement