[url]http://pastebin.com/f79317b2c[/url]
Lines 38 to 68 is where I get confused. I understand what's going on, though I need to know how it works. I understand that the code takes the data from the POST, finds the "buzz" name, then takes the value from it and converts it to an integer.
I don't understand this portion:
[code]
bool repeat;
char name[16], value[16];
[/code]
I think I understand that name and value are being defined as separate char strings, though I haven't been able to find out what the [16] are for. I also don't know how the repeat boolean is being used.
Creating a bool varible called repeat and 2 char arrays, the [16] if for the length of the string.
Also it loops continues while repeat is true. Line 62:
[cpp]
} while (repeat);
[/cpp]
To explain it a bit better the loops keeps checking for the name until it is buzz and the loop goes on until it does not get any name from the server.
Says in the comment to
/* readPOSTparam returns false when there are no more parameters
* to read from the input. We pass in buffers for it to store
* the name and value strings along with the length of those
* buffers. */
So if it does not get any POST Parameters it will not continue looping.
Thanks! Makes a lot more sense now.
Sorry, you need to Log In to post a reply to this thread.