code examples and copyright
Often, us lesser mortals are pointed to sample code posted on these forums, or the more knowledgeable forum members correct problem code or write an example to demonstrate a principle (Darrel, Mel, Bruce etc often rise to this challenge)
I was just wondering what are the legalities in using these code snippets or examples within ones own code, especially if the project isn't a one off for personal use (but not necessarily commercial). For me, I include the originator in a list of contributors at the start of the code, like a simple credit, as the original code has been posted in a public forum on a voluntary basis and thus almost "public domain"
I'm interested in hearing others view point on this