pretty self explainatory question really. I am applying for a job, and in the application form is a question to write pseudo code, but having only ever been briefly introduced to the concept a few years back, all i've got is a full working function in C.<br /><br />My question is, how much detail is needed when writing pseudo code? is there a general loose standard, or will anything do?<br /><br />example: I have a loop to go through a string as a character array like this:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->while (*cptr != '\0'){<br /><br />Â Â Â Â Â Â switch (*cptr) {<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â case 'i':<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â res += 1;<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break;<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â case 'v':<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â res += 5;<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break;<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â case 'x':<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â res += 10;<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break;<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â case 'l':<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â res += 50;<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break;<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â default:<br />Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break;<br />Â Â Â Â Â Â Â Â }<br />Â Â Â Â Â Â Â Â ptr++;<br /><br />}<!--c2--></div><!--ec2--><br /><br />how would you generalise something like that? I can't see really anyway to change it so its not totally C.<br /><br />(also, any kind of reference for pseudo code would be helpful)<br /><br />cheers <img src="http://static.dreamincode.net/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" />
</div>
</div>