Tutorial for list

(sorry for bad english)
Hi, does someone have a tutorial on list in list (table)

This is my table (188 records):

x,y : position
0 : up
90 : right
180 : down
270 : left
the boolean value tell me if i can go to this direction

I want to learn how to access record with some criterias
example: I want to extract the record x= -8 y= 9 (the key) to know if i can go up, right, down and left (return a record), how i can extract info from this record ?

Or what to do if i want to know if i can go in direction 90 if i'm on x= -8 and y= 9 (return true or false)

Can you help me please.

Well, first of all, does each record have the same six fields in the same order? If so, you can simplify the programming by not including the names of the fields in every record.

If there's just one record for each x,y pair, you can use the FIND FIRST block:

If the key is always x,y you should organize your table so that those two values are in a list by themselves, and the other four in another list, so an entry will look like

That way you can do the equality testing in one go:

or just load the List Utilities library and use
Untitled script pic (1)
which gives you the matching record.

Thk, i will test this...

Some tutorial anywhere ? (for all the functions around list...)

I already see this tutorial from jens: https://snap.berkeley.edu/snap/snap.html#present:Username=jens&ProjectName=table%20docu&editMode

There's an overview in the Reference Manual. And if you right-click on a block one of the choices is "help," which will put up a window with documentation of that block.

Because the one currently on that link is too big (80 MB) and it takes forever to download, I have opened your original Word document, converted it on my Windows machine to PDF again, and voila - here's a much lighter PDF https://drive.google.com/file/d/1Hcom9kwGA0rSlhofK1f0a9qBt8ZroCPu/view?usp=sharing

Can you replace the big one with the lighter one on that link. Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.