Raised This Month: $51 Target: $400
 12% 

For what is ; exactly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 01-29-2010 , 12:16   For what is ; exactly
Reply With Quote #1

I like to know, what an
PHP Code:

makes exactly in a code, I've got this:

PHP Code:
        {
            
client_print(idprint_chat"Hey Dude!")
            
set_task(0.1,"hey_dude")
            
HeyDude(id);
        } 
What will happen, if I make this:

PHP Code:
        {
            
client_print(idprint_chat"Hey Dude!");
            
set_task(0.1,"hey_dude");
            
HeyDude(id);
        } 
KadiR is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-29-2010 , 12:17   Re: For what is ; exactly
Reply With Quote #2

This has been asked soooooooooooooooooooooooooooooo many times. Its just the same.
01101101 is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 01-29-2010 , 14:05   Re: For what is ; exactly
Reply With Quote #3

In C++ executed the function.
Example:
PHP Code:
client_print(idprint_chat"lala"); 
The semi-colon will execute the client_print. In C++ you must put at the end of all the functions (excepts if, for, while and others statements).
In Pawn you don't have to put the semi-colon.
Mxnn is offline
V I R U S
Senior Member
Join Date: Jul 2004
Location: Russia / Germany
Old 01-29-2010 , 14:15   Re: For what is ; exactly
Reply With Quote #4

If you're putting semicolon, you can write two functions in a single line.
PHP Code:
client_print(idprint_chat"lala"); client_print(idprint_chat"lala"); 
Without semicolon, each call must be on a new line.
PHP Code:
client_print(idprint_chat"lala")
client_print(idprint_chat"lala"
__________________
V I R U S is offline
Send a message via ICQ to V I R U S
VMAN
Senior Member
Join Date: Oct 2007
Location: California, US
Old 01-29-2010 , 18:09   Re: For what is ; exactly
Reply With Quote #5

It is a good habit though, especially if you are familiar with PHP and those kinds of languages
__________________
VMAN is offline
V I R U S
Senior Member
Join Date: Jul 2004
Location: Russia / Germany
Old 01-29-2010 , 18:15   Re: For what is ; exactly
Reply With Quote #6

Just set it after your code and it will be much easier for you later if you will learn other languages where semicolon must be set!
__________________
V I R U S is offline
Send a message via ICQ to V I R U S
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-29-2010 , 18:29   Re: For what is ; exactly
Reply With Quote #7

Semicolon it's the way to tell for some parser that a sentence finish.

In C, C++ and others languajes it's mandatory.
In Pawn is optional unless you use pragma semicolon option.

Forget about the semicolon, it's just for people who know other languajes and used to put semicolons in their code.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-29-2010 , 18:36   Re: For what is ; exactly
Reply With Quote #8

Quote:
Originally Posted by joropito View Post
Forget about the semicolon
+1
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-29-2010 , 18:58   Re: For what is ; exactly
Reply With Quote #9

Quote:
Originally Posted by KadiR View Post
I like to know, what an
PHP Code:

makes exactly in a code.
Wow, search much?
__________________
fysiks 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 10:54.


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