Where are return codes documented? Specifically, what does Return code
53 signify?
So my question is, why 53? Why anything, though 0 would be less
surprising.
#include <stdio.h>
void main()
{
double f = 1.0;
union {double uf; char c[8];} u;
printf("Size of double = %d\n", sizeof(double));
u.uf = f;
printf("Double = %f, bytes = %d, %d, %d, %d, %d, %d, %d, %d\n", u.uf,
u.c[0], u.c[1], u.c[2], u.c[3], u.c[4], u.c[5], u.c[6], u.c[7]);
}
Le 05/09/2016 à 13:02, Peter Percival a écrit :
Where are return codes documented? Specifically, what does Return code
53 signify?
return codes of WHAT?
Of some windows API?
From lcc?
fropm lcclnk?
Please specify
Le 06/09/2016 à 11:19, Peter Percival a écrit :
So my question is, why 53? Why anything, though 0 would be less
surprising.
#include <stdio.h>
void main()
{
}
You never assign a return value to main(). The return value is then
whatever was in the register EAX when you return from that function.
Since all functions return their result in the eax register, the last function to be called was printf, that returns 53 since it wrote 53
chars to standard output.
jacobnavia wrote:
Le 05/09/2016 à 13:02, Peter Percival a écrit :
Where are return codes documented? Specifically, what does Return code
53 signify?
return codes of WHAT?
Of some windows API?
From lcc?
fropm lcclnk?
Please specify
Oh, sorry, you're right I was a bit vague! I'm refering to a console program. The program seems to run correctly. The name of the
executable between double quote marks is displayed, and then
Return code 53
is displayed. The program is short enough to be reproduced in its
entirety, so I do so below. It is my belief that if I had declared main
to return an int, and if I had ended it with a statement
return 88;
say, then I would see
Return code 88.
So my question is, why 53? Why anything, though 0 would be less surprising.
#include <stdio.h>
void main()
{
double f = 1.0;
union {double uf; char c[8];} u;
printf("Size of double = %d\n", sizeof(double));
u.uf = f;
printf("Double = %f, bytes = %d, %d, %d, %d, %d, %d, %d, %d\n", u.uf,
u.c[0], u.c[1], u.c[2], u.c[3], u.c[4], u.c[5], u.c[6], u.c[7]);
}
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 406 |
Nodes: | 16 (2 / 14) |
Uptime: | 108:01:09 |
Calls: | 8,527 |
Calls today: | 6 |
Files: | 13,209 |
Messages: | 5,920,352 |