Re: initializer for array of array

  • From: "Victor Bombi" <sonoro@xxxxxxxxxxxxxx>
  • To: <luajit@xxxxxxxxxxxxx>
  • Date: Fri, 7 Mar 2014 17:37:38 +0100

Thanks
my error was using
ffi.new("float[2][3]", {{1, 2}, {3, 4}, {5,6}})
instead of
ffi.new("float[3][2]", {{1, 2}, {3, 4}, {5,6}})

this line would be very helpfull in luajit docs!!
  ----- Original Message ----- 
  From: Alex 
  To: luajit@xxxxxxxxxxxxx 
  Sent: Friday, March 07, 2014 3:34 PM
  Subject: Re: initializer for array of array


  This works for me:


  ffi.new("float[3][2]", {{1, 2}, {3, 4}, {5,6}})



  On Fri, Mar 7, 2014 at 4:41 AM, Victor Bombi <sonoro@xxxxxxxxxxxxxx> wrote:

    Hello,

    I know it must be a trivial question but could not find in the help how to 
initialize an array of arrays
    ffi.new("float[3][6]",.....

    Best
    victor bombi 







  -- 

  Sincerely,
  Alex Parrill

Other related posts: