lua-users home
lua-l archive

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

Stefan Brantschen wrote:
> All true. But as long as you know what you're doing, arrays with holes
> can be handled just well (cf. also PIL II, p16).

...which refers to Lua 5.1, not 5.0. I'm aware that 5.1 has extra
functionality to assist with this.

> For example, a table
> representing breakpoints in a file in a debugger, like
> breakpoints = {some_file_name = {2 = true, 25 = true}, other_file = ..}
> is just handy.

True; but such a table is not an array, and therefore you can't
manipulate it like one (using table.insert, table.remove, table.getn,
etc.) It's just a dictionary with numeric keys.

+- David Given --McQ-+ "You cannot truly appreciate _Atlas Shrugged_
|    | until you have read it in the original Klingon."
| ( | --- Sea Wasp on r.a.sf.w
+- --+

Attachment: signature.asc
Description: OpenPGP digital signature