@AdirZig - you want the comma, not the semicolon, to make a list of local variables in the function. (Your list was empty, and I often start my function definitions with an empty list too.)
// function
C_SC_PC_func2 = Function( {SheetName, selSRM},
{i,j}, // use comma
i=3;
j=4;
Show( sheetname, selsrm );
);
//call function
i = j = 0;
C_SC_PC_func2( "string1", "string2" );
show(i,j);
JMP looks at the function function to see if it has three arguments. If it does, and the second argument is a list, it is a list of local variables. If you use a semicolon (making two arguments to function), it becomes a statement in the function body that is evaluated and thrown away.
Craige