Click here to Skip to main content
15,435,745 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.

 
GeneralRe: while(true) is not fun Pin
Bob Beechey20-Sep-20 20:49
MemberBob Beechey20-Sep-20 20:49 
GeneralRe: while(true) is not fun Pin
c6jones72020-Sep-20 22:21
Memberc6jones72020-Sep-20 22:21 
GeneralRe: while(true) is not fun Pin
#realJSOP20-Sep-20 23:52
mva#realJSOP20-Sep-20 23:52 
GeneralRe: while(true) is not fun Pin
glennPattonWork320-Sep-20 23:55
professionalglennPattonWork320-Sep-20 23:55 
GeneralRe: while(true) is not fun Pin
Marc Clifton21-Sep-20 2:58
mvaMarc Clifton21-Sep-20 2:58 
GeneralRe: while(true) is not fun Pin
James Curran21-Sep-20 3:29
MemberJames Curran21-Sep-20 3:29 
GeneralRe: while(true) is not fun Pin
trønderen21-Sep-20 4:04
Membertrønderen21-Sep-20 4:04 
GeneralRe: while(true) is not fun Pin
James Curran21-Sep-20 6:06
MemberJames Curran21-Sep-20 6:06 
Quote:
Because no device with embedded code will last forever. So you could include some sort of "while (this device is not being decomposed into its constituents for recycling purposes) {...}". The question is how the device can perform this test, and take the proper actions to terminate the loop.


Even the most standard loop (for(int i=0; i < str.Length; ++i)) will not survive a power cut, so that's not the case we are interested in.

Most embedded systems still have a "power" switch, which is not hard-wired to the power, but instead, starts the "power-down" procedure. Hence:
while (!shutting_down()) {}
Truth,

James

GeneralRe: while(true) is not fun Pin
trønderen22-Sep-20 0:44
Membertrønderen22-Sep-20 0:44 
GeneralRe: while(true) is not fun Pin
obermd21-Sep-20 3:55
Memberobermd21-Sep-20 3:55 
GeneralRe: while(true) is not fun Pin
trønderen21-Sep-20 4:05
Membertrønderen21-Sep-20 4:05 
GeneralRe: while(true) is not fun Pin
Member 1409260522-Sep-20 21:50
MemberMember 1409260522-Sep-20 21:50 
GeneralOoops. So this should be fun Pin
honey the codewitch20-Sep-20 3:59
mvahoney the codewitch20-Sep-20 3:59 
GeneralRe: Ooops. So this should be fun Pin
OriginalGriff20-Sep-20 4:37
mveOriginalGriff20-Sep-20 4:37 
GeneralRe: Ooops. So this should be fun Pin
Matthew Dennis20-Sep-20 4:40
sysadminMatthew Dennis20-Sep-20 4:40 
GeneralRe: Ooops. So this should be fun Pin
Sander Rossel20-Sep-20 5:04
professionalSander Rossel20-Sep-20 5:04 
GeneralRe: Ooops. So this should be fun Pin
honey the codewitch20-Sep-20 6:08
mvahoney the codewitch20-Sep-20 6:08 
GeneralRe: Ooops. So this should be fun Pin
Sander Rossel20-Sep-20 6:27
professionalSander Rossel20-Sep-20 6:27 
GeneralRe: Ooops. So this should be fun Pin
honey the codewitch20-Sep-20 6:34
mvahoney the codewitch20-Sep-20 6:34 
GeneralRe: Ooops. So this should be fun Pin
Sander Rossel20-Sep-20 6:38
professionalSander Rossel20-Sep-20 6:38 
GeneralRe: Ooops. So this should be fun Pin
honey the codewitch20-Sep-20 6:42
mvahoney the codewitch20-Sep-20 6:42 
GeneralRe: Ooops. So this should be fun Pin
Sander Rossel20-Sep-20 6:47
professionalSander Rossel20-Sep-20 6:47 
GeneralRe: Ooops. So this should be fun Pin
honey the codewitch20-Sep-20 6:49
mvahoney the codewitch20-Sep-20 6:49 
GeneralRe: Ooops. So this should be fun Pin
Sander Rossel20-Sep-20 23:10
professionalSander Rossel20-Sep-20 23:10 
GeneralRe: Ooops. So this should be fun Pin
Nelek20-Sep-20 7:36
protectorNelek20-Sep-20 7:36 

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.


Straw Poll

When building an application, when is the most important time to consider the User Experience?
They are the ones we write code for, right?
  Results   219 votes