Top "Declaration" questions

Declaration is the part of the subprogram (procedure or function) which provides the protocol(header), but not the body of the subprogram.

What’s the difference between “{}” and “[]” while declaring a JavaScript array?

What’s the difference between “{}” and “[]” while declaring a JavaScript array? Normally I declare like var a=[]; What is the …

javascript arrays object javascript-objects declaration
Meaning of = delete after function declaration

class my_class { ... my_class(my_class const &) = delete; ... }; What does = delete mean in that context? Are there any …

c++ function c++11 declaration delete-operator
forward declaration of a struct in C?

#include <stdio.h> struct context; struct funcptrs{ void (*func0)(context *ctx); void (*func1)(void); }; struct context{ funcptrs fps; }; …

c struct declaration forward
What is the 'open' keyword in Swift?

The ObjectiveC.swift file from the standard library contains the following few lines of code around line 228: extension NSObject : Equatable, …

swift swift3 syntax declaration modifier
Assign multiple values to array in C

Is there any way to do this in a condensed form? GLfloat coordinates[8]; ... coordinates[0] = 1.0f; coordinates[1] = 0.0f; coordinates[2] = 1.0f; coordinates[3] = 1.0…

c arrays initialization declaration
Defining static const integer members in class definition

My understanding is that C++ allows static const members to be defined inside a class so long as it's an …

c++ static declaration definition
Where to declare/define class scope constants in C++?

I'm curious about the benefits/detriments of different constant declaration and definition options in C++. For the longest time, I've …

c++ constants declaration
What does "default" mean after a class' function declaration?

I've seen default used next to function declarations in a class. What does it do? class C { C(const C&…

c++ c++11 default declaration keyword
Java: define terms initialization, declaration and assignment

I find the defs circular, the subjects are defined by their verbs but the verbs are undefined! So how do …

java initialization declaration variable-assignment
Java double initialization

In what way are these statements different? double dummy = 0; double dummy = 0.0; double dummy = 0.0d; double dummy = 0.0D;

java double declaration