Closed frankcollins3 closed 1 year ago
intellisense? the auto-infer is showing test() above it's declaration. [11:43pm]
kind of surprised that works. it doesn't matter whether the function is above or below it's invocation. [11:45pm]
interesting problem. searchTraits() is a function within searchDogs() searchDogs() has 2 {goto} statements. even scoped within the outer searchDogs() statement, the inner function does not have access to the other statements.
no callback function for goto but did learn that the func() can be at bottom of app so it has access to goto statements. It just didn't work in this case because of callback scope which would probably apply to alot of situations.. limiting the use of such a catch all goto() function that uses params to display conditional code block. [12:19am]
attempting to do: search function -> sampleDataLoop() nested loop. -> check innerloop string arrays for searchTerm equality -> if (match) => return index[name]; if (!match) => create callback function for goto
heres the if block that matches. the else block is encountered upon search criteria meeting none of the nested loop contents
in seeing that such a goto function: that takes string param, determining different codeblocks with .WriteLine() messages confirming yes or no to {goto()}
if this is to be used over and over, I foresee a problem with this function: if its a callback function, then it will be above the {goto} keywords: error:
proposed approach: in Arduino, a callback function can be used at the top level or all the way on the bottom. Not sure if that will work.
possible improvements: