Skip to main content

Questions tagged [integer]

Common datatype in many programming languages for representing both negative and non-negative whole numbers. Use this tag for questions about using, storing, or manipulating integers. For 64-bit integers, use the [long-integer] tag instead.

integer
1 vote
4 answers
48 views

How to change the class of elements in a list?

I have a string for input with comma seperated elements. - marks = 'marks1,marks2,marks3' Using split function I got list of marks. - marks = marks.split(',') This gives us 'marks' a list with ...
Soham Gandhi's user avatar
-1 votes
2 answers
64 views

Python: Converting string to integer [duplicate]

Firstly, I am new to Python. I am trying to make a simple expenses calculator. I have one function where the user can input distance travelled, and another which is supposed to calculate travel ...
Patrick's user avatar
  • 19
0 votes
0 answers
9 views

Fortran runtime error: Bad value value during integer read

Error is: At line 124 of file calib3.f (unit = 17, file = './temp.clean') Fortran runtime error: Bad value during integer read Error termination. Backtrace: Could not print backtrace: libbacktrace ...
Trisha's user avatar
  • 1
1 vote
1 answer
77 views

Working with 64-bit products and quotients of 32-bit integers in assembly x86-64

Starting to learn assembly x86-64, I'm writing a program that gets an array of integers and does some calculations on it. The purpose isn't relevant to the question, but the calculations include ...
Newlearner826's user avatar
0 votes
1 answer
90 views

In C programming language, can the main function begin with main() instead of int main()? [duplicate]

I'm reading the "C Programming Language, 2nd edition" by Dennis Ritchie and Brian W.Kernighan. On page 38, the main body of the program begins with main() instead of int main(), I believe ...
Greeshma's user avatar
-1 votes
2 answers
58 views

result of division of two number in python is not correct [duplicate]

I have part of code that divide two numbers in python, 22313.6/0.8 i expect that result of this code be a integer number but python return of a float number and this result s wrong. the correct result ...
Behnam Dabagh's user avatar
0 votes
0 answers
22 views

I can't convert the array to an integer value for hline pinescript v5

I can't convert the array to an integer value inside the support and resistance arrays when you draw them with hline. I have the following error: Cannot call 'hline' with argument 'price'='call '...
rakon's user avatar
  • 1
1 vote
0 answers
29 views

Accessing StaticBigInt count of words

Let’s say I want to create custom Integer type. I would use StaticBigInt to initialize it as literal. Here’s an example from official documentation: extension UInt256: ExpressibleByIntegerLiteral { ...
user25846997's user avatar
-3 votes
5 answers
91 views

For loop is not continuing till number becomes 0

I have a java program which count the digits in the integer using for loop it returns me the count as count of digit minus 1 For eg. if i enter 6 digit integer it returns count of 5 if I enter 10 ...
mangeshplusplus's user avatar
-2 votes
0 answers
21 views

Lua WOW - Max number value - a different problem [duplicate]

As I was coding an add-on for World of Warcraft in Lua, I was wondering the limits of and incremental integer. After a few researches on my favorite web browser, I couldn't find a good answer as ...
Greg's user avatar
  • 1
-2 votes
2 answers
77 views

Why do I get a ValueError whenever there is any special character?

I'm trying to add typed in numbers to a list. box = [int(x) for x in input("Type numbers here: ").split()] box.sort(reverse=False) print(box) This code gets ValueError whenever there is ...
Mae Twost's user avatar
0 votes
1 answer
33 views

Csound : How to concat a string and an integer?

I have a Csound instrument that triggers a new sound every 30 seconds with random parameters. So, a new sound every time. I would like each sound to be recorded in a different sound file, such as ...
user3102556's user avatar
0 votes
3 answers
156 views

can you typecast an int into 4 chars using structs?

this is my idea: int main(){ struct mystruct { char a; char b; char c; char d; }; struct mystruct structinstance; //1094795585 is in binary: 01000001 01000001 01000001 01000001 -to ...
bangingmyheadontable's user avatar
0 votes
0 answers
8 views

An integer was expected

Sometimes I have received an error "An integer was expected." where not expected. Example in code: $command = 'arping -c1 1.1.1.1'; // or many other command which can return something or can ...
Andrii Balytskyi's user avatar
1 vote
3 answers
91 views

Will a pointer to int have overhead?

Suppose I have a function foo which takes a parameter n and won't change said parameter, does passing it as pointer incur overhead? Is there any reason to use a pointer in a use case like this? extern ...
Semnodime's user avatar
  • 1,987

15 30 50 per page
1
2 3 4 5
908