This reminds me of when I was learning C. There was a recursion exercise we were supposed to do for the Towers of Hanoi, which leggy) left me severely scratching my head. When we were shown the program, I think there were three lines of code in it —no more than 5—and I figuratively tore my hair out at the one line recursion code.
I'd have to go back and check my C book for the logic. It's been almost 20 years.
(it still surprises me that 20 years is no longer the majority of my years!)
--
You received this message because you are subscribed to the Google Groups "LVL1 - Louisville's Hackerspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lvl1+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
That would be a recursion. Remember hashing and hashpiles? They are data unconnected except for starting with one datum, then connecting two more to it to make a choice, then each connected to two, and so on till the last remaining data become widows, and any new data would attach to the windows and make the next levels of recursion.
The recursion code has a pointer figuratively find the bottom of each branch of the tree and compare each entry to what the program says it needs. It works backward, and when there is a branch that is unexplored yet, again the code has the pointer find the bottom of the branch and starts the search all over again till either the match is found or the whole hashpile is explored and a default error is reached saying the result is not there, and there are no entries left. (your basic 404 error).
This is my take on the pseudocode:
It would say, "is this the end, yet?" Y/N
If N, move down the left side of the pile one level
If Y, [entry comparison function.] If entry != conditions, move up one level of tree and move down the right side one level. Start again at first instruction.
Now all you need to do is convert that to code.
Ginny
Yes, you're right. Sounds more like a database function like MS Access is. And yes, it would be Sequel you'd use. I'd have to refer you to my mom for that, and she hasn't worked with that for about 15 years herself, since she retired. Sorry.
Ginny
--
I'm thinking that in every level you will need a pointer to each level you want, and to do that, on each page have a pointer to a side menu like department stores often have, and indeed my Alma Mater, UofL (louisville.edu) has. Then you can pick from a list of subjects, and if you want a different subject, the pointer for the list is on every page (like the set of horizontal lines box or an arrow button or an open button or the like) and the list flies out. Some, like Target, have a tree that flies out so you can see what tags are included in it.
So I'm thinking one of the functions would be to start with the address that all the pages point to, then it would be a list of pointers with each pointer having a list of pointers beneath that refer to that single department, thus:
Major index address
Tools address with value A
Hand tools sub value 1
Hammer sub sub a
Pliers sub sub b
Screw drivers sub sub c
Etc
Power tools sub value B
Sawzall sub sub a
Circular saw sub sub b
Power drill sub sub c
Etc.
It's in outline format, a format that I haven't seen required in school since eighth grade. Maybe high school once or twice, maybe English 101 once.
And all these would be one list of pointers each having the address of the page appropriate to the subject.
Now for the return trip if you have Tools > hand tools > hammer, then each entry refers back to the address of the pointer that led there, which, I think, would be a lot more coding (and a lot more tedious) than returning to function of the flyout page, which would require only one address to program.
Yours truly,
Ginny