Advertisement
jsbsan

usandoFuncionesExternas

Dec 28th, 2013
1,908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.87 KB | None | 0 0
  1. Public Sub sumar()
  2.  
  3.   Dim valor As Float
  4.  
  5.   valor = UsoLibreriatest.sumar(5.3, 9.8)
  6.  
  7.   Print "suma devolviendo valor: ", valor
  8.  
  9. End
  10.  
  11. Public Sub vector()
  12.  
  13.   Dim Avector As New Float[]
  14.   Dim Bvector As New Float[]
  15.   Dim a As Integer
  16.  
  17.   Avector.Add(1)
  18.   Avector.Add(2.5)
  19.   Avector.Add(3.1)
  20.  
  21.   UsoLibreriatest.duplicaInicial(Avector, Bvector) 'uso funcion el vector Avector es multiplicado por 2
  22.  
  23.   Print "Resultado usando vectores...."
  24.   For a = 0 To Bvector.count - 1
  25.     Print Bvector[a],
  26.   Next
  27.   Print
  28.  
  29. End
  30.  
  31. Public Sub valorarTablero()
  32.  
  33.   Dim tab As New Float[400, 400]
  34.   Dim sumatablero As Float
  35.  
  36.   tab[0, 0] = 1.3
  37.   tab[0, 1] = -5.2
  38.   tab[3, 2] = -10.1
  39.   tab[3, 3] = -100.01
  40.   tab[2, 2] = -1000.003
  41.   tab[399, 399] = 90.0005
  42.  
  43.   sumatablero = UsoLibreriaTest.ValorarTablero(tab, 400)
  44.   Print "Valor: ", sumatablero
  45.  
  46. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement