-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello, I'm trying to follow a standard reference for opening files but running into a constraint_error at the line when I call Ada.Text_IO.Create(). It says "range check failed". Any help appreciated, here's the code:
WITH Ada.Text_IO;
WITH Ada.Integer_Text_IO;
USE Ada.Text_IO;
USE Ada.Integer_Text_IO;
PROCEDURE…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
This is a follow-up of this question: Ada: reading from a file .
I would like to add an exception that checks if the file that I'm opening actually exists or not. I have made a separate procedure to avoid code clutter.
Here is the main code test_read.adb:
with Ada.Text_IO; use Ada.Text_IO;
with…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
What would be a good (free) Ada IDE for either Linux or Windows?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I need to determine the amount left of a time cycle. To do that in C I would use fmod. But in ada I can find no reference to a similar function. It needs to be accurate and it needs to return a float for precision.
So how do I determine the modulus of a Float in Ada 95?
elapsed := time_taken mod…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Dear Friends !
I have very definitively come across the 'simulating a 6-faced die' (which produces a random integer between 1 and 6, all outcomes are equally probable) in Java, Python, Ruby and Bash. However, I am yet to see a similar program in Ada. Has anyone come across one ?
Kind regards
Arkaprav…
>>> More