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
13,616
questions
0
votes
0
answers
15
views
Keeping leading zeros for an int
I am using a Rigol DG 4162 waveform generator, and i want to extract data from it. I am using a USB to RJ45 Either network Adapter and python 3.11 to do this. The problem that I am running into is ...
1
vote
4
answers
55
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 ...
-1
votes
2
answers
67
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 ...
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 ...
1
vote
1
answer
79
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 ...
0
votes
1
answer
91
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 ...
-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 ...
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 '...
1
vote
0
answers
30
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 {
...
-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 ...
-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 ...
-2
votes
2
answers
78
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 ...
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 ...
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 ...
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 ...