Check if given number is of a particular data type and if it's not empty
or null
Since as an absolute beginner, I have some basic questions.
I am asking user to give a value at run time to do some calculations,
I want to test if the user entered value is a real/integer number, and if
not then give a warning that the program is expecting a real/integer
number here.
In addition, I would as well like to know how do we check if a particular
variable at the moment is null or empty. i.e. I have declared a variable
but what if at the time of calculation its value is null or empty or not
yet set, in that case, the program shouldn't crash instead give a warning
to provide a correct value.
Both these operations are much more easier in C++ and C#, but I couldn't
find a way to do that in FORTRAN.
No comments:
Post a Comment