Questions tagged [declare]

Use this tag for questions related to declare, which is usually meant for declaring variables, statements, etc.

736 questions
-1
votes
1 answer

How to select value of variable in ORACLE

Below is the SQL Server's syntax to select variable as a record DECLARE @number AS INTEGER; SET @number = 10; SELECT @number; How can I do this in ORACLE? Thanks in advance. Regards, Sagar Nannaware
-1
votes
1 answer

Need help finding documentation for Ruby's declare method

Can someone tell me what this method does or where I can find documentation on it? declare :percentage, [:value] It's difficult to research this one because I keep getting documentation about declaring variables, methods, etc. Thanks!
-1
votes
1 answer

Passing 2 matrice of unknown sizes as parameters

First - my code that works: void main(){ int mat1[5][5]={{1,2,3,4,5}, {6,2,5,5,6}, {1,5,6,6,7}, {4,5,6,7,8}, {5,6,7,8,9}}; int mat2[3][3]={{1,2,3}, {2,3,4}, …
Muli Yulzary
  • 2,559
  • 3
  • 21
  • 39
-1
votes
1 answer

bash -declare documentation

If you declare an array like this declare -a test you can echo the value like this i=2 echo ${test[i]} or i="1+1" echo ${test[i]} why the second form is accepted? i need a complex answer thanks
Wisp Ever
  • 35
  • 6
-1
votes
3 answers

Difficulty declaring that user input is not an integer C#

I could use a try catch scenario here, but I'm used to saying if x = 30 or if x > 100, but what I need to say is if x != int, but I am not allowed to use that statement. What I need is a way to say, if the input by the user does not equal an…
Kerry G
  • 917
  • 4
  • 12
  • 21
-1
votes
1 answer

How to declare ip address to use it with multiple functions?

I'm implementing a simple client-server program. Some parts of the i wrote is: int main(void){ using namespace boost::asio; using namespace std; const std::string ip = "localhost"; const int port = 10500; ip::address…
-1
votes
4 answers

Declare variable outside of javascript file and use it in file

so i am declaring a variable inside of a .php file But i…
Tim Daubenschütz
  • 2,053
  • 6
  • 23
  • 39
-2
votes
1 answer

Must declare the scalar variable '@Jobcode'

DECLARE @JOBCODE NVARCHAR(MAX); SET @JOBCODE = (SELECT TOP 1 JOBCODE FROM EMPLOYEES WHERE EMPLOYEENAME = 'SCHIPPERT, RALF') I am trying to declare a variable but getting error: Must declare the scalar variable
Amit Amit
  • 9
  • 3
-2
votes
1 answer

Is there a way to use type of three classes inside each other?

When I was trying to write a library for myself that handles the algebraic expressions I encountered a problem. I have three classes: divide, expression, groupexpression. I want to use divide type in expression and group expression. And use…
-2
votes
3 answers

How to DECLARE variable and set values to a field in a table

I am trying to set values but need to use a field, rather than inputting hundreds of values. Current code: DECLARE @variable AS VARCHAR (100) SET @variable = 'Y' I need to be able to use a field as the value: SET @variable = tbl.field I have also…
-2
votes
1 answer

Compiler is throwing error in main that this is not declare before

#include #include using namespace std; class customerNode{ public: int c_id; int quantity; string c_name; string type; customerNode* next_node; }; class Queue{ public: …
khushi
  • 5
  • 1
-2
votes
1 answer

Declare array of UIButtons

I want my swift code to create buttons using colors. I know I want to declare array but some of the things I have tried are not working. What I tried below is not working. I have tried to do various forms of wrapping but it did not work. The goal of…
Sam Burns
  • 65
  • 1
  • 10
-2
votes
1 answer

How to declare object with different name in Javascript?

Let's say i declaring an object let Mahasiswa = { name: "Steve", age: 22 } And then later in my code i copy these code with same name; let {name, age} = Mahasiswa; console.log(name, age) // Steve 22 but how do i change it to different…
trp
  • 9
  • 1
  • 1
  • 4
-2
votes
1 answer

How to declare an array list?

The objective is trying to create a code that gets the difference of the max and min number of the Array List. As a beginner I am having trouble understanding why I get that maxRange is not declared in my code. private int firstElement; public…
-2
votes
1 answer

Static variable to thread C#

In the class program i declare a couple of integers. In the Mains method they get a value. These values are used in the telbereik method, but when the thread starts these values reset to 0. I want them to have the value that is given by the user in…