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

learn more… | top users | synonyms

0
votes
4answers
89 views

Explain variable declaration in C

I found this declaration in a C program char huge * far *p; Explanation: p is huge pointer, *p is far pointer and **p is char type data variable. Please explain declaration in more detail. ...
0
votes
0answers
13 views

Drools: Can't declare new type (with field) in .drl file

I cannot add fields to new type declarations. Do I need an actual Java class for every type declaration in a .drl file? I thought those were generated by Drools? This works: package tests declare ...
0
votes
1answer
55 views

how to declare a global friend function that takes an nested class of a template class?

i have been trying all sorts of declarations but haven't got it right,getting all sortes of errors like, syntex errors and linkig errors. this is the last attempt that made any reason to me. what am ...
0
votes
1answer
21 views

Expected Declaration Specifiers Error?

I'm working in AOP, using AspeCt in an Ubuntu virtual box. My .acc code: before (): execution(int main(void)) { printf("Before test successful!\n"); } after (): execution(int main(void)) { ...
0
votes
2answers
26 views

How can i declare and init two dimensional array of strings (3d of chars)

i need something like this const char **nodeNames[] = { {"RootNode", "Reference", "Node_1", "Node_2", "Node_3"}, {"RootNode", "Hips", "Node_1", "Node_2", "Node_3"}, {"RootNode", ...
2
votes
3answers
61 views

Declaring a nested class in Java

I'm a bit confused with subclasses. Here's my code: public class MedHistory { private String grafts; private String allergies; private String diseases; private String surgeries; ...
0
votes
2answers
15 views

C++ Forward declaration & circular dependency

I've got two classes, Entity and Level. Both need to access methods of one another. Therefore, using #include, the issue of circular dependencies arises. Therefore to avoid this, I attempted to ...
0
votes
1answer
35 views

Local declaration of iOS 6 only pointers (e.g. NSLayoutConstraint)

I have an App which supports both iOS 5 and iOS 6. In one class I need to declare locally some NSLayoutConstraint pointers, which are iOS 6 only. I use them just for the iOS 6 layout, because for iOS ...
0
votes
2answers
36 views

Friend function not declared in this scope error

Hi I am trying to understand the scope of friend functions and I get a "not declared in scope" error. Here is my code: //node.h class Node{ public: int id; int a; int b; friend int ...
0
votes
1answer
52 views

Extend a class from a declaration interface in Typescript

Is there any way to treat an interface or a variable inside a typescript declaration file like class to be able to extend a class from it? Like this: declare module "tedious" { import events = ...
1
vote
1answer
69 views

Speed of separated vs. combined variable declaration in Fortran 90?

Is there any performance advantage to declare multiple variables by one single statement compared to using separate statements for the declaration? This question could be interesting for choosing ...
0
votes
2answers
31 views

Declaring a function without contents ; - and then with contents {} - c++

I am not sure of the terminology so I don't know how to word my title; if someone wants to edit it with the correct terminology that would be fine. When I code something, I always do it, i guess ...
0
votes
1answer
33 views

strange anomaly with fscanf and the order of variable declaration

I have this code to read a file and parse everything into a list of persons: PersonList *parseFile(FILE* file) { PersonList *list = newPersonList(); int r; do { char fname[50]; char ...
0
votes
3answers
88 views

Can you do shorter declarations in C#?

I always write long declares, like: private Dictionary<IPAddress, IWebSocketConnection> Dict = new Dictionary<IPAddress, IWebSocketConnection>(); Is there a way to write it like this: ...
0
votes
2answers
40 views

Declared and initialised variable returning values when printed

The issue arises with the variable shortestval below. It's declared and initialised (at 1000) below. ENSEMBLE Cscan = *C; ENSEMBLE Vscan = *V; int departnumero = Vscan->numero, arrivenumero = ...
0
votes
1answer
15 views

ICMP_ECHO_REPLY32 and IP_OPTION_INFORMATION32

In one of my vb6 code i am using IP_OPTION_INFORMATION and ICMP_ECHO_REPLY which i have declared as Private Type IP_OPTION_INFORMATION Ttl As Byte Tos As Byte Flags ...
0
votes
1answer
17 views

Is better variable declaration and allocation in the same line than in different lines?

It is a pure style question, but, the code is more readable in the first or in the second way? There are rules that talk about it? (I think that the code efficiency is the same, or it isn't?)
1
vote
1answer
28 views

Variable as a part of variable name in it's declaration? Dealing with chart series

Is there a way how can I declare variables in a for loop and using the "int i" as a part of the variable name? I'm trying to set some adjustments of my excel chart in a for loop and assigning ...
0
votes
3answers
67 views

Why does is declaration of a string variable in Java capitalized?

In Java, when one declares a string variable the word "String" is capitalized, yet it isn't in any of the other types I've run across. Why is this? Was it just some weird arbitrary decision by the ...
4
votes
1answer
65 views

detecting equivalence of typedefs

In my application, I have a type responsible for computations that (may) involve large numbers and a type that is used for communication between processors. typedef MyBigIntegerClass bigInt; typedef ...
3
votes
4answers
56 views

How is this pre-standard function declaration compiled with modern compiler?

I found the following declaration code in the very early sources of C compiler main(argc, argv) int argv[]; { return 0; } I tried to run it on ideone.com compiling it in "C" mode with gcc-4.7.2 ...
0
votes
2answers
73 views

What is the meaning of “l” in some variables initialization - C++ [duplicate]

What is the meaning of "l" in some variable initialisations? For example: #define maxpossible (1000000000L) double A = 1L; double B = 999999999l; Is there a difference between "L" and "l"?
0
votes
2answers
41 views

Javascript declaration issue

//PROBLEM SOLVED// It turned out that the JQuery Ajax call couldn't reach the URL in certain browsers. Thanks anyway guys, for your quick responses, definitly helped to work it out. Sorry for the ...
-2
votes
1answer
69 views

Declaring multiple variables at once in a function

If int a, b, c; is a valid declaration Why not int f(int a, b, c)?
1
vote
5answers
68 views

C++ Java static final equivalent

I am using C++ to program a chess game. I want to create two class attributes for the class Board: ROWS and COLUMNS. In Java, I would declare they as static final and everything would work as I want. ...
8
votes
1answer
68 views

Eclipse - Declare variable based on return or get (Shortcut)

I'm not sure how to phrase this in a search, however I was curious if there's a shortcut in eclipse to allow us to declare a variable type based on what's after the equal. For example: firstname = ...
0
votes
1answer
30 views

Javascript fuction declaration conversion

I have a javascript function declared as myFunction: function() { // some codes... } and I want to convert the declaration format to function myFunction() { // some codes... } First of all ...
0
votes
1answer
29 views

Declaring a new object and calling some of its methods on creation

I happened about this declaration on the internet and found it really interesting. However I don't know what to search for to get more information about it. If you could tell me a bit about this or ...
0
votes
1answer
59 views

declaring that a value belongs to some range in matlab

I have a task to calculate some f(x) function in which x belongs to [-4,4] range and h=0.5. At first I tried to write x=rand*(4-(-4))+(-4)) but then I guessed that I was doing wrong and I needed a ...
1
vote
3answers
58 views

Is a class with empty body an incomplete type?

a class declaration makes the class an incomplete type, so no object of the class could be defined. And the definition of an incomplete type is that its member are not specified. Doesn't that means a ...
0
votes
2answers
49 views

Embedded statement cannot be a declaration .Net 2.0 vs 4.0

I have the following declarations in my code which works fine in .net frame work 2.0, Recently i upgraded the project to frame work 4.0 and Im getting the build error saying "Embedded statement ...
1
vote
2answers
54 views

Forward declaration of derived class

I have some code like that: class Class1 { // some code here Class2 inverse() { // some code here } }; class Class2 : public Class1 { // some code here }; And I got an ...
0
votes
2answers
25 views

Define object of a class derived from a string variable

Following is the use case: Invoker class (with main method) public class Invoker { public static void main(String[] args) { String class_file="Batch_Status"; } } Class to be ...
0
votes
2answers
38 views

double field type declaration as zero

What is significant difference between following zero double variable declaration: 0.0 VS 0d double d1 = 0.0; double d2 = 0d; I understand that both these are better than just 0,because are more ...
0
votes
2answers
40 views

codeigniter correct way to check if libraries/helper/core files is loaded

i'm using codeigniter 2. Appreciate if someone could show the correct way to check if the following files : - library file is loaded? - helper file is loaded? - config file is loaded? - model file ...
1
vote
0answers
34 views

Codemodel array

I use CodeModel to generate Java code. I expect output like this: public static final String[] COLUMNS = {ID, CODE, NAME}; I tried: definedClass.field(JMod.PUBLIC|JMod.STATIC|JMod.FINAL, ...
0
votes
0answers
74 views

Seperate Function Decleration and Implementation in F# [duplicate]

I have two functions that call each other. In F#, in order for function A to call function B, B must be declared before the declaration of function A. So when having two functions that call each ...
2
votes
3answers
58 views

Declaration of an array of strings and selecting a single character

I am new to c programming and am trying to print on the screen which key of a keypad is pressed. I have the program to the stage where it prints the row and column number of the key that was pressed. ...
0
votes
1answer
24 views

What kind of Makefile variable assignment is this?

I've used simple makefiles for years, but only recently been assigned the task of learning the ins and outs of a large, complicated set of Autotools-generated makefiles which is used for a code base ...
-1
votes
4answers
47 views

Difference of List and ArrayList in declaration? [duplicate]

Is there a difference between these two? If so, what is it? List<Integer> x = new ArrayList<Integer>(); and ArrayList<Integer> x = new ArrayList<Integer>();
20
votes
11answers
479 views

Define local function in JavaScript: use var or not?

When a local (inner) function is declared in JavaScript, there are two options: Declaring with var keyword, assigning to the variable: (function() { var innerFunction1 = function() { ... }; ...
2
votes
2answers
64 views

Java, What is the difference between assigning null to object and just declaration

What is difference between : Object o = null; and Object o; (just declaration) Can anyone please answer me?
0
votes
2answers
24 views

Creating a runnable that uses parameters

I am doing some Android programming and I want to create a runnable that accepts intents. I understand that the general way of creating a runnable is: Runnable R1 = new Runnable(){ Code }; What I ...
0
votes
2answers
65 views

Define a variable with a subvariable (or with a property)

The target is to have a variable with a Unit property, which could be accessed by e.g.: Params MyParams; MyParams.Diae = 100.0; MyParams.Diae.Unit = "kg"; Ideally, the variable Diae is a ...
0
votes
2answers
32 views

declaration is incompatible with .. (pointer)

I'm getting error on my .cpp file for this dequeue function that should return a pointer to a node The error is : identifier Node is undefined for the return value and declaration is incompatible on ...
8
votes
1answer
131 views

Can Haskell Data Declarations Be Bounded By Type Values

In Haskell, is there a way to limit a data type by the value of its components? I've drafted an example. Say you have a checkers game. A checker is either of the Black or White type. data ...
-1
votes
3answers
43 views

Expected a Declaration

This is my first question (quite new to coding) so will try and include as much info as possible 'cos right now I'm stumped! I'm attempting to write code that will create a butterworth filter to fit ...
-1
votes
1answer
44 views

What are these custom declarations in this C program? [closed]

I have a very simple question, what are these declarations in the beginning of this C program called? Normally in a C program you list the <variable-type> <variable-name>, and optionally ...
2
votes
1answer
67 views

array of arrays of structures in C - declaration

I defined a data structure as follows: struct image{ unsigned int width, height; unsigned char *data; }; An array of structures as defined above would be something like: struct image ...
1
vote
2answers
188 views

How to remove declaration and add root element in existing XML file (C#)

I'm fairly new to XML and C#, so please understand if this question is too sily to ask. I'm converting XML format using C# win-form application. The app opens a xml file using OpenFileDialog, then ...

1 2 3 4 5 19
15 30 50 per page