Const vs Define
#5

Quote:
Originally Posted by Roko_foko
Посмотреть сообщение
Question: why are you defining costants as static? they can't be changed so...
Well, the script which I thought might need some changing if defines are worse in this scenario is an include file and constants should be static in there to avoid clashing. Why am I using static in these examples? No idea.

Anyways, after having a break from thinking about it too much and coming back to it with fresh mind, I found out the answer myself.

In the Snippet thread's examples the definitions are being used as the whole strings and my examples have the definitions being "added" (by the compiler) in formats, which makes this totally different case and obviously defines are better here.

Thread can be closed.
Reply


Messages In This Thread
Const vs Define - by Finn - 13.07.2012, 18:08
Re: Const vs Define - by Vince - 13.07.2012, 18:30
Re: Const vs Define - by Roko_foko - 13.07.2012, 18:47
Re: Const vs Define - by milanosie - 13.07.2012, 18:50
Re: Const vs Define - by Finn - 13.07.2012, 18:57
Re: Const vs Define - by Roko_foko - 13.07.2012, 19:03

Forum Jump:


Users browsing this thread: 1 Guest(s)