AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Why are new functions mixed capitalized? (https://forums.alliedmods.net/showthread.php?t=49522)

harbu 01-06-2007 10:34

Why are new functions mixed capitalized?
 
For example the sqlX module, the new hud system and new api for plugin intercommunication. Is there a reason why they are not all in lowercase like the rest of the functions but part of them are capitalized? I just find it a pain in the ass to have to capitlize them everytime and often get errors because of this.

Code:

SQL_Connect
SQL_GetInsertId

CreateHudSyncObj
CreateMultiForward
CreateOneForward


Rixorster 01-06-2007 10:38

Re: Why are new functions mixed capitalized?
 
Yeh, it's fucked up :S

SweatyBanana 01-06-2007 13:31

Re: Why are new functions mixed capitalized?
 
SQLx is all capitalized..

http://www.amxmodx.org/funcwiki.php?go=inc&id=50

Anyway, what are you talking about?


Every new word or part of word usually gets capitalized..

Just like in most variables.

Rixorster 01-06-2007 13:54

Re: Why are new functions mixed capitalized?
 
All other functions from before (Engine functions etc.) are not capitalized. :/

SweatyBanana 01-06-2007 14:38

Re: Why are new functions mixed capitalized?
 
Well it isn't the same module now is it?

harbu 01-06-2007 15:07

Re: Why are new functions mixed capitalized?
 
Ehh? Everything else in the core is lowercase except the new hud functions. DBI functions are in lowercase, same for fun, most of engine, cstrike, dodx, dodfun, fakemeta, nvault, tsx etc. Why break the trend on SQLx and the new hud functions?

teame06 01-06-2007 15:11

Re: Why are new functions mixed capitalized?
 
It because the person who design the code was Bailopan. Personally I like this style better then the old way. So he would be know the reason why he did it that way.

Brad 01-06-2007 17:48

Re: Why are new functions mixed capitalized?
 
BAILOPAN has matured. That's why it's changed. :)

Zenith77 01-06-2007 21:42

Re: Why are new functions mixed capitalized?
 
For those of you that don't know:

Code:

this_is_linux_style()
ThisIsWindowsStyle()

I've always stuck with the latter style and apparently as stated before, BAIL likes the window's style to (it's easier to tell what is a function, and what is a variable and other stuff.)

You could use defines though if you're that annoyed with it.

Code:
// IIRC you can do this in pawn. #define this_is_my_function AFunctionUsingWindowsStyle this_is_my_function(hi);

Brad 01-07-2007 00:20

Re: Why are new functions mixed capitalized?
 
Those two styles have nothing to do with Windows or Linux.


All times are GMT -4. The time now is 22:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.