View Single Post
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-07-2023 , 19:17   Re: What is the difference in the way these variables are declared?
Reply With Quote #14

Quote:
Originally Posted by Leech_v2 View Post
What is the difference between adding 'new' and removing 'new'?

What I want to know is the purpose of using 'new' in combination with other specifier.
As far as I know, the feature of 'new' is that it allows declared variables to use runtime expressions as initialization expressions. However, runtime expressions cannot be used outside of a function, so I am wondering why it can be combined with other specifier?

Code:
new stock gVar;
stock gVar;

new static gVar;
static gVar;

new public gVar;
public gVar;

new static stock gVar;
static stock gVar;
https://raw.githubusercontent.com/co.../pawn-lang.pdf
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh