Skip to main content

Timeline for Simple Temperature Converter 2 in C

Current License: CC BY-SA 3.0

20 events
when toggle format what by license comment
May 23, 2017 at 12:40 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Apr 13, 2017 at 12:40 history edited CommunityBot
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Apr 12, 2017 at 7:31 history edited CommunityBot
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
Aug 30, 2016 at 9:14 history edited Mast CC BY-SA 3.0
Congratulations on your well-written answer. I've cut away the non-SE compliant fluff to make it even better :-)
Aug 30, 2016 at 5:15 comment added Aleks. M. @chris260 It all depends, but I'd certainly put the main loop intomain() in such a program. It is too small and clear to worry about such decisions. Of course, if your program grows, you may consider separating logic (In GTK you have gtk_main() function which creates a loop for your GUI app, keeps you away from tons of different checks, while you can focus on creating widgets). In terms of advantages, you get rid of redundancy as inter_face() wasn't meant to be managed or interrupted in main(), just giving your loop a name. Here you can read more about main().
Aug 29, 2016 at 20:49 comment added chris360 @Aleks.M. Thank you for your post, it is tremendously helpful! So the main loop, or run loop should be part of the main function in a program such as this? Is there any advantages to this? Thank you!
Aug 29, 2016 at 20:44 vote accept chris360
Aug 29, 2016 at 15:30 history edited Aleks. M. CC BY-SA 3.0
Minor change.
Aug 29, 2016 at 15:05 comment added Aleks. M. Yes, I understand. That's why I mentioned it's not necessary, and that it's just my opinion that functions used in main() should be above main().
Aug 29, 2016 at 14:55 comment added smac89 If you're going to move the function prototypes to a header file, then there is no point in declaring the functions before the main function. Those can all be moved below main
Aug 29, 2016 at 14:40 history edited Aleks. M. CC BY-SA 3.0
Minor changes.
Aug 29, 2016 at 14:24 comment added Aleks. M. I totally forgot about this one. Thanks for reminding! I think it's better to leave printf() in that case to be as it doesn't force you to provide a specific stream, which is always stdout in this program.
Aug 29, 2016 at 14:15 comment added chux Why recommend puts(), yet still use printf("Option: ");? Simply use fputs("Option: ", stdout);. IAC, best to use what is most clear to read.
Aug 29, 2016 at 11:25 history edited Aleks. M. CC BY-SA 3.0
Minor change.
Aug 29, 2016 at 11:18 history edited Aleks. M. CC BY-SA 3.0
A few more changes. x2
Aug 29, 2016 at 11:10 history edited Aleks. M. CC BY-SA 3.0
A few more changes.
Aug 29, 2016 at 10:45 history edited Aleks. M. CC BY-SA 3.0
Corrected given information, corrected grammar, etc.
Aug 29, 2016 at 9:11 history edited Aleks. M. CC BY-SA 3.0
Grammar
Aug 29, 2016 at 9:06 review First posts
Aug 29, 2016 at 9:35
Aug 29, 2016 at 9:01 history answered Aleks. M. CC BY-SA 3.0