On Wed, Jun 2, 2010 at 1:47 AM, Kobi Lurie <[email protected]> wrote:
> 1) In C sharp, multi dimensional arrays are built into the language, and
> I find them very useful for representing a board, or a board with a few
> layers.
> the syntax is also pretty nice: int[,,] cube = new int[3,3,3]; for example.
> but you can also do int[,,,,,,,,] (if you have the ram ;-)
>
> Does factor have something similar? (matrices with as many dimensions as
> I want)
> I don't know how to implement such a thing, or even how to access the
> elements in factor.

Factor has the nth and set-nth words; you can cook up a
multiple-dimensional abstraction on top, either by representing it as
array of arrays, or one big array in row (or column) major order with
some arithmetic to convert indices into row (column) major indices.

> 2) Does factor have support for command line windows, reading one key at
> a time?
> this can be useful for little games, or in tutorials for learning how to
> program.

There is a curses binding in the curses vocabulary. It is
Unix-specific. We don't have anything for console access on Windows,
but you're welcome to add the relevant bindings to the
windows.kernel32 vocabulary and contribute your changes.

Slava

------------------------------------------------------------------------------

_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to