Questions tagged [function-calls]

Function (or method) calling is the act of using a function or a method.

Functions (or methods) are blocks of code.
They are there, ready to perform some action (a sequence of instructions, including the possibility of calling other functions - even themselves, which is called recursion).
If nobody calls them, the are useless (dead code).

351 questions
0
votes
1 answer

javascript window['func'] with parameters returning undefined instead of function

I'm trying to pass json to a function, which in turn takes the json and displays dynamic ui-modal dialog. When I try to pass the button events(functions) , thy are getting executed and returning undefined how can I pass reference to the function…
Nishanth Matha
  • 5,993
  • 2
  • 19
  • 28
0
votes
1 answer

How to call a function with arguments from template in SilverStripe

Lets say I have the following function: function fruit ($request) { ... $response = array('apple' => '1dollars', 'mango' => '2dollars'); return json_encode($response); } I want to access something like $response.apple inside my…
0
votes
1 answer

Pass arbitrary number of a set of variables to Python Function

I am not sure on the precise way to phrase the question as it is easier to just demonstrate with code. I would like to have a function that accepts a variable number of a set of 3 required and 1 optional arguments. As an illustration,…
0
votes
3 answers

Inheritance / Calling function from object in array

Hello! I am rather new to Javascript. I am better in Java so I get confused in many things about Javascript. I've created class Clovek witch has some variables and functions. Later I've created array Lide witch has MAX (100) objects of Clovek in it.…
Kryštof Řeháček
  • 1,965
  • 1
  • 16
  • 28
0
votes
1 answer

SetInterval calling method using .call(this) calls it only once

Hello I am completely new to JavaScript and I am trying to do something , but I can't understand when I call this function: this.start = function () { this.interval = setInterval(startIncrement.call(this) , 1000); } startIncrement only executes…
kuskmen
  • 3,648
  • 4
  • 27
  • 54
0
votes
1 answer

Counting Function calls in ISO C89

I have to write a function in C for my homework. Given the functions is_prime(n) and nth_prime(n),the first returning 1 if n is prime(or 0 if it's not) and nth_prime returning the nth prime number, i have to write the function next_prime(count)…
Luke
  • 125
  • 6
0
votes
1 answer

Function call fails when I replace an inline function with a named one

Why does the following code runs: someExpression.then((result)=>{ console.log(util.inspect(result,{depth:null})); return result; })) and when this function has a name it doesn't: function print(result) { …
arisalexis
  • 2,079
  • 2
  • 21
  • 42
0
votes
2 answers

How to get a ByVal function result instead of ByRef?

Inspired by the following posts: How do i return an object from a function in Delphi without causing Access Violation? Destroying TADODataset created in runtime I wonder, if there is any option to explicitly tell a function that I want a ByVal…
Interface Unknown
  • 713
  • 10
  • 26
0
votes
1 answer

Bash Script DLL Load

Is a Bash script able to load a DLL and call its functions? If so, how can this be done? Other scripting languages, such as Python and Perl are able to do this. How about Bash? There seems to be very little online about this. In a testing…
Jim Fell
  • 13,750
  • 36
  • 127
  • 202
0
votes
3 answers

F# syntax error

I'm having a syntax error. I want to take the floor of a function that returns a floating point number. I thought this would give me the right answer let cyclesPerInterrupt bps bpw cpu factor = floor (fudge (float(factor) cyclesPerWord cpu…
Paul Nathan
  • 39,638
  • 28
  • 112
  • 212
0
votes
0 answers

@HTML.TextBoxFor Performance inside Loop

I am in a tough situation, help is highly appreciated.Long story short, I have a view showing around 45 columns(cant avoid) , which has around 500 or more records. This is showed inside a Partial View with 'FOR loop' with a condition. When the…
0
votes
2 answers

R: Identifying vector & dataframe names from function calls

Say I have a function my.function taking x, a numerical vector, as its only argument. I need to decompose or parse the string from match.call()$x in such a way that I can identify: the vector's name and label if any the structure it's in, if any…
Dominic Comtois
  • 10,230
  • 1
  • 39
  • 61
0
votes
1 answer

Why can't I call this function (javascript/jquery)

This is driving me nuts .... I have written a function function seraliseQuery(){ for(var i=1; i<=variables;i++){ alert(queryPreds[i]+" - "+queryObjs[i]); } } I just want to be able to call it from my other function $(".object").click(…
Ankur
  • 50,282
  • 110
  • 242
  • 312
0
votes
1 answer

Trying to call a function inside JavaScript file has no action

I recreated my mobile application I am trying to develop using CLI this time, so that I can add my plugins in my Phonegap 3.4 with a much easiest way. The problem is that in my JavaScript, when I call the registerdb function, nothing works fine. I…
user3811444
0
votes
5 answers

How are arrays passed to a function in Java

In C, when we pass an array in a function call, only a pointer to the array is passed to aid memory and time efficiency, and we cannot calculate the size of the array in the called function. We have to pass the size as a parameter to the called…
user3126841
  • 155
  • 2
  • 2
  • 9