Click here to Skip to main content
15,887,214 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
glennPattonWork322-Dec-23 1:16
professionalglennPattonWork322-Dec-23 1:16 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
mdblack9822-Dec-23 2:10
mdblack9822-Dec-23 2:10 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Owen Lawrence22-Dec-23 5:19
Owen Lawrence22-Dec-23 5:19 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Juan Pablo Reyes Altamirano22-Dec-23 5:49
Juan Pablo Reyes Altamirano22-Dec-23 5:49 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
jschell22-Dec-23 7:09
jschell22-Dec-23 7:09 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Ralf Quint22-Dec-23 7:27
Ralf Quint22-Dec-23 7:27 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Member 1616867422-Dec-23 13:35
Member 1616867422-Dec-23 13:35 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
sx200826-Dec-23 19:17
sx200826-Dec-23 19:17 
Early c-compilers could only return values but not expressions.
(this was a design flaw of the compiler/c language)
C++
{
   int x;
   x = 42;
   return x; // ok
   return x + 1; // does not compile because x + 1 is an expression
   return(x + 1); // ok, the expression is evaluated by the compiler
This is why you see the return statement so often together with parentheses even when they aren't required anymore.
You should NOT write these unnesseccary parentheses anymore!
The return statement is not a function call; just omit the parentheses.
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
jschell27-Dec-23 5:59
jschell27-Dec-23 5:59 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
sx200829-Dec-23 16:59
sx200829-Dec-23 16:59 
QuestionGood alternatives to STM32CubeIDE? Pin
CPallini21-Dec-23 1:03
mveCPallini21-Dec-23 1:03 
AnswerRe: Good alternatives to STM32CubeIDE? Pin
Mike Hankey21-Dec-23 3:24
mveMike Hankey21-Dec-23 3:24 
GeneralRe: Good alternatives to STM32CubeIDE? Pin
CPallini21-Dec-23 3:32
mveCPallini21-Dec-23 3:32 
GeneralRe: Good alternatives to STM32CubeIDE? Pin
honey the codewitch21-Dec-23 4:28
mvahoney the codewitch21-Dec-23 4:28 
AnswerRe: Good alternatives to STM32CubeIDE? Pin
honey the codewitch21-Dec-23 4:27
mvahoney the codewitch21-Dec-23 4:27 
GeneralRe: Good alternatives to STM32CubeIDE? Pin
CPallini21-Dec-23 7:15
mveCPallini21-Dec-23 7:15 
GeneralRe: Good alternatives to STM32CubeIDE? Pin
honey the codewitch21-Dec-23 7:16
mvahoney the codewitch21-Dec-23 7:16 
AnswerRe: Good alternatives to STM32CubeIDE? Pin
Nagy Vilmos22-Dec-23 1:52
professionalNagy Vilmos22-Dec-23 1:52 
GeneralRe: Good alternatives to STM32CubeIDE? Pin
CPallini22-Dec-23 4:14
mveCPallini22-Dec-23 4:14 
GeneralKnow Thyself Pin
Steve Raw20-Dec-23 21:00
professionalSteve Raw20-Dec-23 21:00 
GeneralRe: Know Thyself Pin
jschell21-Dec-23 4:33
jschell21-Dec-23 4:33 
GeneralRe: Know Thyself Pin
Steve Raw21-Dec-23 5:20
professionalSteve Raw21-Dec-23 5:20 
AnswerRe: Know Thyself Pin
David O'Neil21-Dec-23 7:13
professionalDavid O'Neil21-Dec-23 7:13 
GeneralRe: Know Thyself Pin
Steve Raw21-Dec-23 14:04
professionalSteve Raw21-Dec-23 14:04 
GeneralRe: Know Thyself Pin
Daniel Pfeffer21-Dec-23 19:34
professionalDaniel Pfeffer21-Dec-23 19:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.