Re: [TUT] Code Styling
Switching about every two weeks can throw you off though. I program in C++ for two weeks, then switch to Pawn for two weeks, then switch back. It's not easy because I usually forget like half of what I learned about AMXX (since that's the only thing I would ever use such a painfully simple language like Pawn for) the last time around when I finally come back, even down to basic stuff. x_x
|
Re: [TUT] Code Styling
I finally got around to writing a plugin that uses this style. You can see it here:
http://forums.alliedmods.net/showthread.php?t=102839 I also added it to the conclusion. |
Re: [TUT] Code Styling & Good Programming Habits
Thanks!
|
Re: [TUT] Code Styling & Good Programming Habits
Nice tut, only thing I disagree is with the new line before opening bracket.
If you're a programmer, you can easily recognize identifiers that imply a code block, and the new lines before every block allow for less code to fit in one page. |
Re: [TUT] Code Styling & Good Programming Habits
Quote:
Hawk, this is a sticky thread and a lot of people read this, so better to fix. PHP Code:
|
Re: [TUT] Code Styling & Good Programming Habits
Quote:
:bacon: PHP Code:
|
Re: [TUT] Code Styling & Good Programming Habits
Quote:
|
Re: [TUT] Code Styling
Quote:
In pawn there isn't the concept "pointer" (a variable which value is an address and that, with features of the language, can be used to perform operations on/with the data that is located at that address). What is happening here is that register_cvar returns an address that in a language like C++ can be used as a pointer but in Pawn it can only be provided to a native in C++ so that it can be used as a pointer. So g_Test holds an address but that isn't enough to make it a pointer because pawn doesn't has pointers. |
Re: [TUT] Code Styling & Good Programming Habits
Quote:
Quote:
|
Re: [TUT] Code Styling & Good Programming Habits
Quote:
PHP Code:
|
All times are GMT -4. The time now is 11:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.