GodForsakenSoul Posted January 6, 2010 Posted January 6, 2010 func genericfunction($something1, $something2, $something3) i saw people put variables in the () things. (i don't know how they are called XDD) i never understood WHY. what does it do? please explain it as if i'm retarded ._.
99ojo Posted January 6, 2010 Posted January 6, 2010 Hi, These are parameters parsed to the function and use them in beetween the function. Maybe this is understandable: _mymsgbox ("Title", "Message") Func _mymsgbox ($title, $message) MsgBox (0, $title, $message) EndFunc ;-)) Stefan
GodForsakenSoul Posted January 6, 2010 Author Posted January 6, 2010 slightly... yes... but could you give a less abstract example?
Juvigy Posted January 6, 2010 Posted January 6, 2010 (edited) _mymsgbox ("First", "Example") _mymsgbox ("Second", "Example") _mymsgbox ("", "Is it more clear now?") Func _mymsgbox ($title, $message) MsgBox (0, $title, $message) EndFunc Edited January 6, 2010 by Juvigy
GodForsakenSoul Posted January 6, 2010 Author Posted January 6, 2010 ... holy @#!% i learn this NOW?!?!?! dear god, dude, i love you!
99ojo Posted January 6, 2010 Posted January 6, 2010 slightly... yes... but could you give a less abstract example? Hi, maybe: $a = 5 $b = Random (1, 10, 1) If $a < $b Then _mymsgbox ("Smaller", $a & " is smaller then " & $b) ElseIf $a > $b _mymsgbox ("Bigger", $a & " is bigger then " & $b) Else _mymsgbox ("Equal", $a & " equals " & $b) EndIf Func _mymsgbox ($title, $message) MsgBox (0, $title, $message) EndFunc ;-)) Stefan P.S: Too late, Juvigy has had a less abstract and hopefully now understandable ....
James Posted January 6, 2010 Posted January 6, 2010 Troll Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
jvanegmond Posted January 6, 2010 Posted January 6, 2010 I always wondered what [] does... Local $arr[3] = [1,2,3] What does it mean? github.com/jvanegmond
GodForsakenSoul Posted January 6, 2010 Author Posted January 6, 2010 (edited) Troll why troll? i'm serious. this is literally the first time i understand this concept. @Manadar: it defines the size of the array. $array[3] has 3 spots of data. however, spot #1 is actually $array[0]. so think in -1s waaaaaaait a minute...... Edited January 6, 2010 by GodForsakenSoul
James Posted January 6, 2010 Posted January 6, 2010 why troll? i'm serious. this is literally the first time i understand this concept. @Manadar: it defines the size of the array. $array[3] has 3 spots of data. however, spot #1 is actually $array[0]. so think in -1s waaaaaaait a minute...... How the fuck do you understand arrays like that but not function parameters Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
GodForsakenSoul Posted January 6, 2010 Author Posted January 6, 2010 look, i'm special allright? mommy said so.
jvanegmond Posted January 6, 2010 Posted January 6, 2010 waaaaaaait a minute...... waaaaaaait a minute...... Haha brilliant. github.com/jvanegmond
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now