This is C code for an interpreter for the Brainf*** language, and [ is the beginning of the looping structure. I am making a superset to the language, called TripleHack, but I NEED to understand this looping structure. I can't figure out what this does! The code is in the middle of the interpret function. I took out all the unnecessary stuff.Code:for( i=1,d=c; i && *c; c++ ) i+=*c=='[', i-=*c==']'; if(!i) { c[-1]=0; while(a[p]) { interpret(d); } c[-1]=']'; break; }
Thank you
It is said that the only language all programmers understand is profanity.




Reply With Quote