Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

An output argument (or parameter) is assigned a result. In Pascal, for instance, a procedure like ReadInteger(n) would assign the result to n. In C (which does not have variable parameters) you need to pass the address of the argument, so the function call is instead ReadInteger(&n). The example function ReadInteger has a side effect so it is therefor preferable to use an output parameter rather than to return a result.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: