[ H3LP ] Can't return string on functions?
Hello, why I can't return string on functions?
Example: Code:
Other little question, it's really needed add " ; " after all code if applicable? |
Re: [ H3LP ] Can't return string on functions?
About the ';', it aint needed. Only pawner's style.
|
Re: [ H3LP ] Can't return string on functions?
Because it will return each char in part( like %s = (szName[0] && szName[1] && szName[2] && szName[3] ) it is very poor method to return arrays with natives, you should format or copy the output in a string variable.
PHP Code:
|
Re: [ H3LP ] Can't return string on functions?
@EFFx, @Craxor, thanks!
|
Re: [ H3LP ] Can't return string on functions?
Search about returning a string by reference...
Semicolons are just a coding style suppose to mean end of line... |
Re: [ H3LP ] Can't return string on functions?
Natsheh, I know about by-reference natives. Which is the fast? style=0 or style=1?
|
Re: [ H3LP ] Can't return string on functions?
You should always use style 0.
|
Re: [ H3LP ] Can't return string on functions?
Ok Hamlet, thank you.
|
Re: [ H3LP ] Can't return string on functions?
It works:
Code:
|
Re: [ H3LP ] Can't return string on functions?
Code:
Code:
Why you decrease -1 and then add +1 again? |
| All times are GMT -4. The time now is 23:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.