function-definition Questions
13
Solved
How do you view a stored function or procedure?
Say I have an old function without the original definition - I want to see what it is doing in pg/psql but I can't seem to figure out a way to do tha...
Unrivaled asked 19/8, 2010 at 18:11
2
I need help with this following counting sort implementation. Is it because value of x can be too big? I am getting segmentation fault. This is what gdb says:
Program received signal SIGSEGV, Segm...
Sufferable asked 9/8, 2016 at 5:25
6
Solved
What is useful about this C syntax — using 'K&R' style function declarations?
int func (p, p2)
void* p;
int p2;
{
return 0;
}
I was able to write this in Visual Studios 2010beta
// yes, ...
Noisy asked 27/10, 2009 at 12:59
11
Solved
I've recently noticed something interesting when looking at Python 3.3 grammar specification:
funcdef: 'def' NAME parameters ['->' test] ':' suite
The optional 'arrow' block was absent in Pytho...
Goolsby asked 17/1, 2013 at 13:3
4
Solved
I need to swap the values of 2 arrays in a function. The problem is I can change anything in the main, just the function itself. It should recive 2 integer arrays, and swap those. The problem is, t...
Coycoyle asked 10/4, 2018 at 10:34
4
Solved
I'm more like C++ than C, but this simple example of code is big surprise for me:
int foo() {
return 3;
}
int main() {
int x;
foo(&x);
return x;
}
https://godbolt.org/z/4ov9nTzjM
No warni...
Koral asked 17/1, 2022 at 12:29
1
Solved
My fuctions for insert and display look like below:
int push_front( Node **head, int rollnumber, int src, int dst, double gentime )
{
Node *new_node = malloc( sizeof( Node ) );
int success = new_...
Desai asked 13/1, 2022 at 18:41
1
Solved
Let's say I have the following function in Haskell:
compose2 = (.) . (.)
How would I go about finding the type of this function? Because of the multiple compositions I get stuck trying to determine...
Tavy asked 28/11, 2020 at 14:10
1
I read that the extern keyword is implicit in the context of functions, so unless you specify otherwise using the static keyword (which if I'm not mistaken is basically a completely separate concep...
Repetition asked 11/11, 2020 at 7:0
4
Solved
I know that you can declare a function without any arguments simply like this:
void test()
{
cout << "Hello world!!" << endl;
}
But I have also seen
void test(void)
{
cout ...
Rattlepate asked 28/7, 2020 at 19:16
2
Solved
I would like to define a series of functions dynamically in ZSH.
For example:
#!/bin/zsh
for action in status start stop restart; do
$action() {
systemctl $action $*
}
done
However, this res...
Pyaemia asked 10/6, 2019 at 23:43
3
Solved
I have found the following python function definition:
def reverseString(self, s: 'List[str]') -> 'None':
I don't quite understand 'List[str]' and -> 'None'.
I have found that the arr...
Nasopharynx asked 6/2, 2019 at 10:39
1
Solved
How can I know whether to use def, cdef or cpdef when defining a Cython function, assuming I want optimal performance?
Anglicize asked 8/3, 2018 at 11:58
2
We include header files like stdio.h in our C programs to use the built-in library functions. I once used to think that these header files contained the function definitions of the built-in functio...
Selffulfillment asked 14/3, 2017 at 13:19
2
Solved
I've asked a question here about whether taking the address of a function forces the compilation of said function specifically with regard to Substitution-Failure-Is-Not-An-Error. The most direct a...
Pl asked 18/7, 2016 at 13:8
2
Solved
From what I gather from this answer, a constexpr function's result is not a constant-expression if the function has not been declared yet. What surprises me is the following code snippet :
constex...
Johnsiejohnson asked 30/5, 2016 at 13:1
1
Solved
There are many question about this error. But they are related to only a single variable.
test.h
namespace World
{
enum Objects
{
TERRAIN = 1,
BOX = 2,
SPHERE = 4,
CAPSULE = 8
};
void ...
Despair asked 28/5, 2015 at 9:3
3
Solved
I'm trying to declare a pointer and pass that pointer to a function where memory is allocated. Here is a minimal example:
#include <string>
#include <iostream>
using namespace std;
v...
String asked 18/4, 2014 at 15:15
3
i tried to write 3-4 where statement in a one function but i get error and couldnt do it , i tried to do something like that :
foo x=
| x == foo1 = 5
| x == foo2 =3
| x == foo3 =1
| otherwise =2
...
Resendez asked 1/4, 2013 at 9:5
1
© 2022 - 2025 — McMap. All rights reserved.