G
Grant Schoep
Ok, back to basics here.
I was completly shocked and dismayed today when one of my apps returned an
error from main. Not so much that it returned an error, that was expected.
But what happened.
I swear that main was supposed to return "int", i.e. some postive/neg
integer of unknown byte lenght(compiler/platform depenendent byte lenght of
course)
So anyways.
I just found out, that on my current system. RedHat ES 3, the return status
from the shell is only an 8 byte unsigned integer. I swear I had more range
before, but that was under different shells and OS's.
So. Is this a OS, shell, or compiler limit?
Meaning, I want to code the correct thing, I just don't know now how to
validly code it, as I had thought main in C/C++ was always supposed to
return (int)
I'm switching my return codes to postive 0-255 value now. Not so bad as the
couple peices of software that interact with this I also now maintain. But
just would like more on this story.
-grant
I was completly shocked and dismayed today when one of my apps returned an
error from main. Not so much that it returned an error, that was expected.
But what happened.
I swear that main was supposed to return "int", i.e. some postive/neg
integer of unknown byte lenght(compiler/platform depenendent byte lenght of
course)
So anyways.
I just found out, that on my current system. RedHat ES 3, the return status
from the shell is only an 8 byte unsigned integer. I swear I had more range
before, but that was under different shells and OS's.
So. Is this a OS, shell, or compiler limit?
Meaning, I want to code the correct thing, I just don't know now how to
validly code it, as I had thought main in C/C++ was always supposed to
return (int)
I'm switching my return codes to postive 0-255 value now. Not so bad as the
couple peices of software that interact with this I also now maintain. But
just would like more on this story.
-grant