[Gambas-user] R: Matrix resize

Ru Vuott vuott at ...325...
Fri Dec 6 01:36:57 CET 2013


...maybe:


Private b As Byte
Private bb As Byte[]


Public Sub Button1_Click()

  Inc b

' We define the "new" number of rows in a two-dimensional matrix
' with a new value one greater than the previous:
  bb = New Byte[b, 3]

  bb[b - 1, 1] = b

  Print bb[b - 1, 1]

End









--------------------------------------------
Gio 5/12/13, terco IDE <tercoide at ...67...> ha scritto:

 Oggetto: [Gambas-user] Matrix resize
 A: "gambas-user at lists.sourceforge.net" <gambas-user at lists.sourceforge.net>
 Data: Giovedì 5 dicembre 2013, 13:20
 
 First of everything: BIG thanks to
 Benoit for crating Gambas!
 
 Is there any workaround for resizing matrices?
 
 rigth now, I'm using this code
 
 notMatrix.Resize(100*200)  ' 100 rows, 200 cols
 
 ' get element [row,col]
 
 x = notMatrix[col + row*200]
 
 , and on a big program, code get's really dirty
 
 
 Thanks!
 
 
 Saludos
 Martin
 
     
         
           
   
 ------------------------------------------------------------------------------
 Sponsored by Intel(R) XDK 
 Develop, test and display web and hybrid apps with a single
 code base.
 Download it for free now!
 http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
 _______________________________________________
 Gambas-user mailing list
 Gambas-user at lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list