Top "Function" questions

A function (also called a procedure, method, subroutine, or routine) is a portion of code intended to carry out a single, specific task.

How to pass dictionary items as function arguments in python?

My code 1st file: data = {'school':'DAV', 'standard': '7', 'name': 'abc', 'city': 'delhi'} my_function(*data) 2nd file: my_…

python function python-2.7 dictionary
PHP Function with Optional Parameters

I've written a PHP function that can accepts 10 parameters, but only 2 are required. Sometimes, I want to define the eighth …

php function parameter-passing
Ignore python multiple return value

Say I have a Python function that returns multiple values in a tuple: def func(): return 1, 2 Is there a nice …

python function tuples
Javascript sleep/delay/wait function

Sorry if this question has already been asked here before, I could not find a suitable answer. I am wanting …

javascript function delay sleep wait
Javascript Array of Functions

var array_of_functions = [ first_function('a string'), second_function('a string'), third_function('a string'), forth_function('a string') ] …

javascript arrays function
Passing an array as an argument to a function in C

I wrote a function containing array as argument, and call it by passing value of array as follows. void arraytest(…

c arrays function parameters parameter-passing
C - function inside struct

Im trying to create a function inside a structure, so far i have this code: typedef struct client_t client_…

c function struct
How can I create a Java method that accepts a variable number of arguments?

For example, Java's own String.format() supports a variable number of arguments. String.format("Hello %s! ABC %d!", "World", 123); //=> …

java function methods overloading
How to Call a Function inside a Render in React/Jsx

I want to call a function inside some embedded html. I tried the following but the function isn't called. Would …

javascript reactjs function render jsx
Return multiple values from a function, sub or type?

So I was wondering, how can I return multiple values from a function, sub or type in VBA? I've got …

function vba return-value ms-word