lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 19/03/2011, at 12:46 PM, Daurnimator wrote:

> On 18 March 2011 21:23, Mike Pall <mikelu-1103@mike.de> wrote:
>> [No, this doesn't change the 1-based semantics of {} and #, etc.]
>> 
>> --Mike
>> 
> 
> I don't have luajit on me to check...
> does
> print(#ffi.new("double[3]"))
> show 3, 2 or just error?
> I question this, as getting the last element by doing #object may be invalid

LuaJIT 2.0.0-beta6 -- Copyright (C) 2005-2011 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc fuse
> ffi = require("ffi")
> print(#ffi.new("double[3]"))
stdin:1: attempt to get length of 'double [3]'
stack traceback:
	stdin:1: in main chunk
	[C]: ?