declaration Questions
3
Solved
I have a function in PL/SQL:
FUNCTION do_something
RETURN BOOLEAN
IS
...
BEGIN
...
END
This function can be called as such:
DECLARE
answer BOOLEAN;
BEGIN
answer := do_something();
END
No...
Laroche asked 10/2, 2014 at 12:27
13
Solved
Other languages with automatic variable declaration - like Perl - have a strict mode.
By activating this strict mode, variable declaration is required, and Perl throws an error as soon as you try ...
Thermostatics asked 7/7, 2010 at 8:27
2
Solved
What is the difference in using unnamed namespace and global declaration?
Is there any specific context for using these two?
Can we access unnamed namespace components in external source files?
Sectarianize asked 14/8, 2013 at 19:3
2
In a module, do you have to both create declarations in a .ixx file and definitions in a .cpp file, or do you just put everything in a .ixx file? Is there anything else that I should know about mod...
Apophthegm asked 24/3, 2022 at 0:8
2
Solved
I see a lot of different typedef usages in many C courses and examples.
Here is the CORRECT way to do this (example from ISO/IEC C language specification draft)
typedef struct tnode TNODE;
struct ...
Upshaw asked 25/2, 2022 at 19:39
1
Solved
Does typedef VLA require evaluation of the size expression?
int f(void);
int main(void)
{
typedef int (T) [ f() ]; // is f required to be evaluated ?
T x;
return sizeof x;
}
Does typedef pointe...
Proteose asked 25/2, 2022 at 16:45
9
Solved
I am studying python, and although I think I get the whole concept and notion of Python, today I stumbled upon a piece of code that I did not fully understand:
Say I have a class that is supposed ...
Blinny asked 24/9, 2012 at 16:20
1
Solved
Why this code:
extern void x;
leads to:
$ cl t555.c /std:c11 /Za
t555.c(1): error C2182: 'x': illegal use of type 'void'
What is illegal here?
UPD. Use case:
$ cat t555a.c t555.p.S
#include <s...
Said asked 1/2, 2022 at 23:20
3
Solved
In C you can declare a variable that points to an array like this:
int int_arr[4] = {1,2,3,4};
int (*ptr_to_arr)[4] = &int_arr;
Although practically it is the same as just declaring a pointer ...
Gabfest asked 28/1, 2022 at 12:19
11
Solved
I want to write reusable code and need to declare some variables at the beginning and reuse them in the script, such as:
DEFINE stupidvar = 'stupidvarcontent';
SELECT stupiddata
FROM stupidtable
...
Largess asked 25/8, 2010 at 9:3
2
Solved
What is the point of declaration of enumeration types? Is it immediately after the name of an enumeration? I saw Standard C++ 14 (n4296) §3.3.2/3:
The point of declaration for an enumeration is ...
Corticosterone asked 29/2, 2016 at 8:40
3
Solved
When normally using a for-in-loop, the counter (in this case number) is a constant in each iteration:
for number in 1...10 {
// do something
}
This means I cannot change number in the loop:
fo...
Pirn asked 31/1, 2015 at 11:33
4
Solved
When I specialize a (static) member function/constant in a template class, I'm confused as to where the declaration is meant to go.
Here's an example of what I what to do - yoinked directly from ...
Avicenna asked 23/3, 2010 at 8:28
12
What is the meaning of const in declarations like these?
class foobar
{
public:
operator int () const;
const char* foo() const;
};
Marrero asked 15/4, 2009 at 13:27
8
Solved
In C++ classes, why the semi-colon after the closing brace? I regularly forget it and get compiler errors, and hence lost time. Seems somewhat superfluous to me, which is unlikely to be the case. D...
Knighterrantry asked 24/4, 2009 at 12:47
2
Solved
I have been looking at a source code, and i came across this code
static char const *const delimit_method_string[] =
{
"none", "prepend", "separate", NULL
};
I th...
Edington asked 27/11, 2021 at 8:36
4
Solved
I have learned that pointers can be declared in 3 different ways:
int* a;
int *b;
int * c;
I prefer:
int* a;
While declaring a pointer to a structure, is it correct to write it like following:
st...
Neckwear asked 14/10, 2021 at 16:11
7
Solved
I am confused about these two structures from different tutorials:
typedef struct complex {
float real;
float imag;
} COMPLEX;
typedef struct {
float real;
float imag;
} COMPLEX;
COMPLEX c1;
...
Efferent asked 13/9, 2021 at 9:0
4
Solved
In Access 2010 VBA, if I run this sub:
sub test
Dim db
Dim rst
Set db = CurrentDb()
Set rst = db.OpenRecordset("select * from mytable")
Debug.Print "db: " & TypeName(db)
Debug.Print "...
Glennaglennie asked 24/2, 2014 at 13:44
1
I know let in JS cannot be declared the variable twice. But when I try the below code in my console:
a = 1;
let a = 2;
let a = 3;
.
.
.
let a = 100;
Note: They are run line by line (as shown in...
Mercedes asked 13/7, 2021 at 1:31
8
Solved
At w3schools there is written:
If you declare a variable, without using "var", the variable always becomes GLOBAL.
Is it useful to declare global variable inside the function? I can imagine to...
Neumann asked 31/7, 2011 at 9:20
2
✅
int[] array = new int[]{1,2,3};
✅
int[] array = {1,2,3};
✅
int[] array;
array = new int[]{1,2,3};
❌
int[] array;
array = {1,2,3};
Can someone explain why the last one is wrong an...
Altair asked 1/6, 2021 at 3:35
3
Solved
#include <stdio.h>
struct context;
struct funcptrs{
void (*func0)(context *ctx);
void (*func1)(void);
};
struct context{
funcptrs fps;
};
void func1 (void) { printf( "1\n" )...
Senhor asked 3/4, 2012 at 18:50
1
Solved
I've been testing global variables, defining and declaring, and I stopped at this situation:
main.c:
#include "stdio.h"
void func(void);
int a;
int main(void) {
a = 20;
printf("i...
Sheepherder asked 26/4, 2021 at 16:9
1
I know that a declaration like
int* a[5];
declares a as an array of 5 pointers to int. But how do I deduce this, just by using the C++ Standard?
Holub asked 25/4, 2021 at 20:29
© 2022 - 2024 — McMap. All rights reserved.