Jump to content

Recommended Posts

Posted

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 ._.

Posted

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

Posted (edited)

_mymsgbox ("First", "Example")
_mymsgbox ("Second", "Example")
_mymsgbox ("", "Is it more clear now?")

Func _mymsgbox ($title, $message)
    MsgBox (0, $title, $message)
EndFunc

Edited by Juvigy
Posted

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 ....

Posted (edited)

Troll Posted Image

why troll? i'm serious. :evil:

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 by GodForsakenSoul

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...