<div style="font-family: Helvetica; font-size: 13px; ">Hi.</div><div style="font-family: Helvetica; font-size: 13px; "><br></div><div style="font-family: Helvetica; font-size: 13px; ">Thanks for the answers, but I feel I need to explain myself a bit better.</div><div style="font-family: Helvetica; font-size: 13px; "><br></div><div style="font-family: Helvetica; font-size: 13px; ">I'm not looking for example codes (like r.example or v.example), I'm looking for _real_ code,</div><div style="font-family: Helvetica; font-size: 13px; ">but more specifically, some piece of code that was wrote in a way that my look confusing</div><div style="font-family: Helvetica; font-size: 13px; ">to a beginner programmer, but that is well explained in the comments.</div><div style="font-family: Helvetica; font-size: 13px; "><br></div><div style="font-family: Helvetica; font-size: 13px; ">for instance, (python):</div><div style="font-family: Helvetica; font-size: 13px; "><br></div><div style="font-family: Helvetica; font-size: 13px; ">&gt; actual code:</div><div style="font-family: Helvetica; font-size: 13px; "><div style="font-family: Helvetica; font-size: 13px; "># remove file extensions, join all names and remove white spaces (all at once)</div><div style="font-family: Helvetica; font-size: 13px; ">self.nomMerge = 'Merge_' + ''.join(['' if i == ' ' else i for i in '_'.join([i[:-4] for i in nomMerge])]) + '.txt'</div><div style="font-family: Helvetica; font-size: 13px; "><br></div><div style="font-family: Helvetica; font-size: 13px; ">&gt; explained in comments:</div><div style="font-family: Helvetica; font-size: 13px; "># &nbsp; &nbsp; &nbsp; &nbsp;this line is the same as:</div><div style="font-family: Helvetica; font-size: 13px; "># &nbsp; &nbsp; &nbsp; &nbsp;a = [i[:-4] for i in nomMerge] # remove file extensions</div><div style="font-family: Helvetica; font-size: 13px; "># &nbsp; &nbsp; &nbsp; &nbsp;b = '_'.join(a) # first join</div><div style="font-family: Helvetica; font-size: 13px; "># &nbsp; &nbsp; &nbsp; &nbsp;c = ['' if i == ' ' else i for i in b] # remove white spaces</div><div style="font-family: Helvetica; font-size: 13px; "># &nbsp; &nbsp; &nbsp; &nbsp;d = '_'.join(c) # second join</div><div style="font-family: Helvetica; font-size: 13px; "># &nbsp; &nbsp; &nbsp; &nbsp;e = 'Merge_' + d + '.txt'</div></div><div style="font-family: Helvetica; font-size: 13px; "><br></div>
                <div><div><br></div><div>I don't speak C or C++, but I know this kind of situation can happen, so</div><div>I'm looking for examples such as the above but in C, or C++&nbsp;</div><div><br></div><div>best</div><div><br></div><div>Carlos</div><div><br></div><div><br></div><div>--&nbsp;</div><div><span style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; display: inline !important; float: none; ">Prof. Carlos Henrique Grohmann</span><br style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; "><span style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; display: inline !important; float: none; ">Institute of Geosciences - Univ. of São Paulo, Brazil</span><div style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; ">- Digital Terrain Analysis | GIS | Remote Sensing -&nbsp;</div><div style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; "><br><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a><div>________________<br>Can’t stop the signal.</div></div></div><div>Sent with <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a></div><div><br></div></div>
                 
                <p style="color: #A0A0A8;">On Sunday, 22 April 2012 at 01:02, Carlos Grohmann wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>
                <div>
                    Hello devs,
                </div><div><br></div><div>I was wondering if you could provide me with an example of GRASS' code that would look</div><div>obscure and complicated to a non-experienced programmer, but that at the same time is&nbsp;</div><div>nicely explained by the comments (maybe with some pseudo-code)?</div><div><br></div><div>I'm looking into that with teaching and (it's a long shot but..) academic intents.</div><div><br></div><div>thanks</div><div>&nbsp;</div>
                <div><div><br></div><div>--&nbsp;</div><div><span style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; display: inline !important; float: none; ">Prof. Carlos Henrique Grohmann</span><br style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; "><span style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; display: inline !important; float: none; ">Institute of Geosciences - Univ. of São Paulo, Brazil</span><div style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; ">- Digital Terrain Analysis | GIS | Remote Sensing -&nbsp;</div><div style="color: rgb(0, 0, 0); font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: small; "><br><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a><div>________________<br>Can’t stop the signal.</div></div></div><div>Sent with <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a></div><div><br></div></div>
            </div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>