Need help about exprresions
Hi guys!
I have question about some expressions in pawn. What are these expressions? Code:
^, ?, :Code:
random_num(0, 1) ? 1.0 : -1.0Please help me! |
Re: Need help about exprresions
^ is the default escape character of pawn.
? and : are used for the short hand if-statement. |
Re: Need help about exprresions
Quote:
And examples... can't think of any right now, but I know some people are using it in encoding their strings for some security reason. |
Re: Need help about exprresions
Quote:
about "^": for example: Code:
name[0] = '^0'I want to know what this do actually? |
Re: Need help about exprresions
Quote:
PHP Code:
PHP Code:
And for this: PHP Code:
So, these four are exactly the same: PHP Code:
PHP Code:
And ^" ^" format as you call it are escaped quotes. You must use escaped quotes if you use multiple quotes in your string, telling the compiler that quote in your string is not closing quote for your string, but rather just a quote character inside it. Example: PHP Code:
Code:
My name is "KliPPy"PHP Code:
|
Re: Need help about exprresions
Thank you!:)
|
Re: Need help about exprresions
This:
PHP Code:
PHP Code:
|
Re: Need help about exprresions
Quote:
|
| All times are GMT -4. The time now is 13:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.