I literally just spent weeks trying to find why my app kept crashing with an illegal memory access error, and it was because my procedure name was simply Proc() instead of Proc(p) when creating the thread. Yes, 1 single missing byte in my 900,000+ byte source was bringing my app to its knees. A true needle in the haystack!
So, a warning by the compiler that Proc() had no parameter would've alerted me to the problem instantly. Thank you.
And to stave off any forthcoming complaints that the compiler shouldn't check all procedure parameters: CreateThread() is an exception because by its very definition it gets you to name the procedure without any parameters in its name:
Code: Select all
Thread = CreateThread(@ProcedureName(), *Value)