Raised This Month: $ Target: $400
 0% 

Avoid duplicating the code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-08-2019 , 11:09   Re: Avoid duplicating the code
Reply With Quote #1

Code:
Function1() {     if( get_pcvar_num( cvar1 ) )     {         if( blablabla )         {             Function2();         }     }     else     {         if( tuctuctuc )         {             Function2();         }     } } Function2() {     //do some 20 lines here (same lines as above) }
__________________
hleV is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:28.


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