Guest
The piece of code goes like this:
process
variable m,n: integer:=0;
type integer_file is file of integer;
file intfile: integer_file open read_mode is "integers.txt";
begin
while not(endfile(intfile)) loop
read(intfile,m);
read(intfile,n);
----
----
end process;
The values in the file integers.txt are like 3,4,10,12 etc seperated by
space. But when it reads the values m & n, its getting it all wrong,
the values being very high like 805965104,221252109,168636426,... etc.
I am bugged as to what is happening.
-neo
process
variable m,n: integer:=0;
type integer_file is file of integer;
file intfile: integer_file open read_mode is "integers.txt";
begin
while not(endfile(intfile)) loop
read(intfile,m);
read(intfile,n);
----
----
end process;
The values in the file integers.txt are like 3,4,10,12 etc seperated by
space. But when it reads the values m & n, its getting it all wrong,
the values being very high like 805965104,221252109,168636426,... etc.
I am bugged as to what is happening.
-neo