Raised This Month: $ Target: $400
 0% 

Solved What does mean ampersands and dots before variable name?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 09-09-2021 , 14:54   Re: What does mean ampersands and dots before variable name?
Reply With Quote #3

Not sure that i understood about ampersands but thank you so much

PHP Code:
plugin_init()
{
    new 
1
    
new 2

    
// I want to make sure. If i change them in funcA/B
    
funcA(x)
    
funcB(y)
    
// then here, after execution, x will be 3
    // and y still 2?
}

funcA(&x)
{
    
3
    
// even with
    
return PLUGIN_HANDLED
}

funcB(y)
{
    
4
    
// yes?
    
return PLUGIN_HANDLED

What is "reference parameters"? Sometimes i see "by reference", "reference parameters" and so on and can't figure out what it is
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 09-09-2021 at 15:09.
kww is offline
 



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 02:32.


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