Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Steven Friedrich on March 03, 2022, 05:52:12 pm

Title: Since when is an int a byte?
Post by: Steven Friedrich on March 03, 2022, 05:52:12 pm
I am starting a new console application using code::blocks and it gave me a main.c with hello world.
I changed the return to -1, compiled and ran it.  Here's the output in the terminal:
Hello world!

Process returned 255 (0xFF)   execution time : 0.001 s
Press ENTER to continue.

Why is it claiming the return code is a byte?  An int is 64 bits on x86_64 Linux.
Title: Re: Since when is an int a byte?
Post by: Commaster on March 03, 2022, 06:31:48 pm
https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html (https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html) Because that's how shell and processes work?