Hi there everyone, recently I have started my internship at an IT department at a company.

Now I have a little assignment where I have to make some assignments in KiXtart. But even on the first "sheet" I have run into some problems I just can't figure out.

I have to create a function that can multiply/divide/add/subtract integers and then load them in the variable.

But I just can't add the right parameter to make a distinction between what to do.

My guess is that I have to declare the different parameters so it knows what to do. But I just can't figure it out.

 Code:
$var2 = som2(1,8,"+")
? "var= " + $var2


Function som2($num1, $num2,"+","-","*","/")
	Dim $num3
	Dim $num2
	Dim $num1
	"+" = +
	
	Select Case
	
		Case $som2 = $num1 "+" $num2
			$num1 + $num2
	EndSelect
		
EndFunction



Could someone guide me in the right direction, but not spoil the whole assignment?

Thanks!


Edited by Asakura (2010-09-05 08:26 PM)