Questions tagged [function-call]

A function call is a line of code that executes a specific block of code defined as a function, that is, self-contained code that may optionally take arguments, defined for the purpose of code reuse.

A function call is a line of code that executes a specific block of code defined as a function, that is, self-contained code that may optionally take arguments, defined for the purpose of code reuse.

760 questions
3
votes
2 answers

How to pass multiple arguments to a smarty function?

I've a following code snippet from smarty template: The following is the function body:
user2838698
3
votes
8 answers

javascript Call function 10 times with 1 second between

How to call a function 10 times like for(x=0; x<10; x++) callfunction(); but with 1 sec between each call?
user3129452
  • 65
  • 1
  • 1
  • 6
3
votes
4 answers

Method in C++ to call a function every certain number of minutes

I'm using Visual Studio 2012 and C++, I need to call a function every 5 minutes, I've managed to do it but it consumes 25% of my CPU which is far from ideal. The code is as follows, time_t start; time_t end; time(&start); while (1)…
Ryan
  • 957
  • 5
  • 16
  • 34
3
votes
2 answers

php nested objects function call not working?

I have a PHP class that can contain an array of its own type this class has also a function called hatch() when I call it for one of the array items it gives me a message you can't call the function. I call it like that…
Romany Saad
  • 115
  • 1
  • 9
2
votes
1 answer

How can i stop hearing mediaplayer on call?

I thought that android automatically stops sound from other sources than call . But i have seen in a program i'm developing that it only put it too low . Anyway to solve this problem? Any OnCall event?
A.Quiroga
  • 5,704
  • 6
  • 37
  • 58
2
votes
3 answers

Jquery self-call function loop

I'm trying to check whether my self-calling jquery function did the job done but what happened is that the result keep multiplying on each self calling. HTML Javascript $(function(){ callme(); }); function…
datuamizan
  • 23
  • 1
  • 4
2
votes
1 answer

Why is my user defined function repeating twice?

I am programming a piece of code for the credit problem in problem set 1 of CS50. This code already works, but during some debugging I noticed that my first function, which checks whether a credit card number complies with Luhn's algorithm, was…
2
votes
2 answers

Is it possible, in C, to write in one line a call to a function that has an array of strings (ie ptr) or int, or ... as parameter?

Let's consider these two functions : void my_foo1(char ** my_par, int size) { for (int i=0; i
Stef1611
  • 1,978
  • 2
  • 11
  • 30
2
votes
1 answer

why stack overflow attacks (modifying the returning address of a function call) caused segmentation fault in `_int_malloc`

I'm learning the structure of stack frames. And trying to implement a function that can call another function without an explicit call in C by modifying the returning address (in its stack frame) of the function call. The code is like the…
ttzytt
  • 57
  • 4
2
votes
2 answers

How does this lambda get its function argument in common lisp?

I have a table list: (defvar moo '((:name "vince" :age 35) (:name "jess" :age 30))) and I call this function on that list: (defun test (name) (remove-if-not #'(lambda (person) (equal (getf person :name) name)) moo)) (test…
Vinn
  • 1,030
  • 5
  • 13
2
votes
1 answer

Wait/pause code execution for given amount of time before executing certain function in JavaScript

I am tring to build quiz app for my side project in vanila js and html. I have a a condition where i need to wait for sometime before executing a certain code.How can create function which take time as parameter to pause the code execution. I tried…
Rovan Lama
  • 33
  • 6
2
votes
1 answer

Drawing call function diagrams using pyan results in the diagram of just one python file

I'm trying to draw function call diagram for a complicated functional python code including many python files and related functions across them. I managed to make use of pyan tool to draw call diagram, but it just do it for a single *.py file and…
f.ashouri
  • 5,409
  • 13
  • 44
  • 52
2
votes
2 answers

Where does the function continue after a re-render?

When the state called loading is set to true and a re-render of the component is caused, where does the function continue? Does it run console.log(1) again, just that it's that fast that I can't track it? Or does it contiune with console.log(2)? Or…
JackFrost
  • 83
  • 1
  • 9
2
votes
1 answer

C- Passing entire structure variable

Here is a simple C programs in structure but i dont quite get what am i doing wrong as the output is not what i desired , P1 #include struct book { char name[10]; char author[10]; int refno; }; //passing whole structure variable…
Raon
  • 113
  • 8
2
votes
1 answer

How to create a function inside a structure in a header file and implement this function in another c source file?

Here I created a main.c #include #include "Header.h" struct person_t a; int main() { a.func(1,2); } And I have a header called "Header.h", I define a structure in this file struct person_t { char name; unsigned age; …
0983
  • 31
  • 3