Mon May 27 20:21:23 2024
EVENTS
 FREE
SOFTWARE
INSTITUTE

POLITICS
JOBS
MEMBERS'
CORNER

MAILING
LIST

NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.

DATE 2010-03-01

HANGOUT

2024-05-27 | 2024-04-27 | 2024-03-27 | 2024-02-27 | 2024-01-27 | 2023-12-27 | 2023-11-27 | 2023-10-27 | 2023-09-27 | 2023-08-27 | 2023-07-27 | 2023-06-27 | 2023-05-27 | 2023-04-27 | 2023-03-27 | 2023-02-27 | 2023-01-27 | 2022-12-27 | 2022-11-27 | 2022-10-27 | 2022-09-27 | 2022-08-27 | 2022-07-27 | 2022-06-27 | 2022-05-27 | 2022-04-27 | 2022-03-27 | 2022-02-27 | 2022-01-27 | 2021-12-27 | 2021-11-27 | 2021-10-27 | 2021-09-27 | 2021-08-27 | 2021-07-27 | 2021-06-27 | 2021-05-27 | 2021-04-27 | 2021-03-27 | 2021-02-27 | 2021-01-27 | 2020-12-27 | 2020-11-27 | 2020-10-27 | 2020-09-27 | 2020-08-27 | 2020-07-27 | 2020-06-27 | 2020-05-27 | 2020-04-27 | 2020-03-27 | 2020-02-27 | 2020-01-27 | 2019-12-27 | 2019-11-27 | 2019-10-27 | 2019-09-27 | 2019-08-27 | 2019-07-27 | 2019-06-27 | 2019-05-27 | 2019-04-27 | 2019-03-27 | 2019-02-27 | 2019-01-27 | 2018-12-27 | 2018-11-27 | 2018-10-27 | 2018-09-27 | 2018-08-27 | 2018-07-27 | 2018-06-27 | 2018-05-27 | 2018-04-27 | 2018-03-27 | 2018-02-27 | 2018-01-27 | 2017-12-27 | 2017-11-27 | 2017-10-27 | 2017-09-27 | 2017-08-27 | 2017-07-27 | 2017-06-27 | 2017-05-27 | 2017-04-27 | 2017-03-27 | 2017-02-27 | 2017-01-27 | 2016-12-27 | 2016-11-27 | 2016-10-27 | 2016-09-27 | 2016-08-27 | 2016-07-27 | 2016-06-27 | 2016-05-27 | 2016-04-27 | 2016-03-27 | 2016-02-27 | 2016-01-27 | 2015-12-27 | 2015-11-27 | 2015-10-27 | 2015-09-27 | 2015-08-27 | 2015-07-27 | 2015-06-27 | 2015-05-27 | 2015-04-27 | 2015-03-27 | 2015-02-27 | 2015-01-27 | 2014-12-27 | 2014-11-27 | 2014-10-27 | 2014-09-27 | 2014-08-27 | 2014-07-27 | 2014-06-27 | 2014-05-27 | 2014-04-27 | 2014-03-27 | 2014-02-27 | 2014-01-27 | 2013-12-27 | 2013-11-27 | 2013-10-27 | 2013-09-27 | 2013-08-27 | 2013-07-27 | 2013-06-27 | 2013-05-27 | 2013-04-27 | 2013-03-27 | 2013-02-27 | 2013-01-27 | 2012-12-27 | 2012-11-27 | 2012-10-27 | 2012-09-27 | 2012-08-27 | 2012-07-27 | 2012-06-27 | 2012-05-27 | 2012-04-27 | 2012-03-27 | 2012-02-27 | 2012-01-27 | 2011-12-27 | 2011-11-27 | 2011-10-27 | 2011-09-27 | 2011-08-27 | 2011-07-27 | 2011-06-27 | 2011-05-27 | 2011-04-27 | 2011-03-27 | 2011-02-27 | 2011-01-27 | 2010-12-27 | 2010-11-27 | 2010-10-27 | 2010-09-27 | 2010-08-27 | 2010-07-27 | 2010-06-27 | 2010-05-27 | 2010-04-27 | 2010-03-27 | 2010-02-27 | 2010-01-27 | 2009-12-27 | 2009-11-27 | 2009-10-27 | 2009-09-27 | 2009-08-27 | 2009-07-27 | 2009-06-27 | 2009-05-27 | 2009-04-27 | 2009-03-27 | 2009-02-27 | 2009-01-27 | 2008-12-27 | 2008-11-27 | 2008-10-27 | 2008-09-27 | 2008-08-27 | 2008-07-27 | 2008-06-27 | 2008-05-27 | 2008-04-27 | 2008-03-27 | 2008-02-27 | 2008-01-27 | 2007-12-27 | 2007-11-27 | 2007-10-27 | 2007-09-27 | 2007-08-27 | 2007-07-27 | 2007-06-27 | 2007-05-27 | 2007-04-27 | 2007-03-27 | 2007-02-27 | 2007-01-27 | 2006-12-27 | 2006-11-27 | 2006-10-27 | 2006-09-27 | 2006-08-27 | 2006-07-27 | 2006-06-27 | 2006-05-27 | 2006-04-27 | 2006-03-27 | 2006-02-27 | 2006-01-27 | 2005-12-27 | 2005-11-27 | 2005-10-27 | 2005-09-27 | 2005-08-27 | 2005-07-27 | 2005-06-27 | 2005-05-27 | 2005-04-27 | 2005-03-27 | 2005-02-27 | 2005-01-27 | 2004-12-27 | 2004-11-27 | 2004-10-27 | 2004-09-27 | 2004-08-27 | 2004-07-27 | 2004-06-27 | 2004-05-27 | 2004-04-27 | 2004-03-27 | 2004-02-27 | 2004-01-27 | 2003-12-27 | 2003-11-27 | 2003-10-27 | 2003-09-27 | 2003-08-27 | 2003-07-27 | 2003-06-27 | 2003-05-27 | 2003-04-27 | 2003-03-27 | 2003-02-27 | 2003-01-27 | 2002-12-27 | 2002-11-27 | 2002-10-27 | 2002-09-27 | 2002-08-27 | 2002-07-27 | 2002-06-27 | 2002-05-27 | 2002-04-27 | 2002-03-27 | 2002-02-27 | 2002-01-27 | 2001-12-27 | 2001-11-27 | 2001-10-27 | 2001-09-27 | 2001-08-27 | 2001-07-27 | 2001-06-27 | 2001-05-27 | 2001-04-27 | 2001-03-27 | 2001-02-27 | 2001-01-27 | 2000-12-27 | 2000-11-27 | 2000-10-27 | 2000-09-27 | 2000-08-27 | 2000-07-27 | 2000-06-27 | 2000-05-27 | 2000-04-27 | 2000-03-27 | 2000-02-27 | 2000-01-27 | 1999-12-27

Key: Value:

Key: Value:

MESSAGE
DATE 2010-03-17
FROM Ruben Safir
SUBJECT Subject: [NYLXS - HANGOUT] C++ Workshop - Switches and Break

_______________________________________________________________________________________________________

Switch Statement:

In addition to the if/else construction, C++ has a switch statement
which improves readablity of appropriate code. The basic format for
switch looks like this:

switch(expression that returns an int){
case int1:
statements;
statements;
statement;
break;
case int2:
statements;
statements;
statement;
break;
case int3:
statements;
statements;
statement;
break;
case int4:
statements;
statements;
statement;
break;
default:
statements;
statements;
statement;
}

There is a couple of caveats with the switch syntax. First, it is
really unlike any other C or C++ syntax. Be aware that the conditional
statement when is in the switch() syntax must return some from of an
integer, and on that note, recall that char are implicit integers. You
can not use a string as a return type.

The break at the end of each case block is necessary to stop the switch,
otherwise you code will check more than one case. You can have multiple
cases share the same statement block by constructing your switch like
this:




switch(expression that returns an int){
case int1:
statements;
statements;
statement;
break;
case int2:
case int3:
case int4:
statements;
statements;
statement;
break;
default:
statements;
statements;
statement;
}

With this structure, case int2, int3, and int4 all share the statement
block listed on case int3.

--Next Functions
--
http://www.mrbrklyn.com - Interesting Stuff
http://www.nylxs.com - Leadership Development in Free Software

So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998

http://fairuse.nylxs.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002

"Yeah - I write Free Software...so SUE ME"

"The tremendous problem we face is that we are becoming sharecroppers to our own cultural heritage -- we need the ability to participate in our own society."

"> I'm an engineer. I choose the best tool for the job, politics be damned.<
You must be a stupid engineer then, because politcs and technology have been attached at the hip since the 1st dynasty in Ancient Egypt. I guess you missed that one."

? Copyright for the Digital Millennium

  1. 2010-03-01 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] this should not get through
  2. 2010-03-01 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Catching the streams from Flash Video
  3. 2010-03-02 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] [ruben-at-mrbrklyn.com: [jim-at-well.com: [conspire] open source
  4. 2010-03-02 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Phone Tech Wars
  5. 2010-03-02 Ron Guerin <ron-at-vnetworx.net> Subject: [NYLXS - HANGOUT] NYLUG Workshop / Hacking Society (Smalltalk, C++, Python) Tuesday March 2 6:00PM-8:00PM
  6. 2010-03-02 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] this should not get through
  7. 2010-03-02 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] this should not get through
  8. 2010-03-02 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] this should not get through
  9. 2010-03-03 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] C++ Workshop _ Syntax Basics - agregate data types
  10. 2010-03-03 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] C++ Workshop _ Syntax Basics - agregate data
  11. 2010-03-03 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] C++ Workshop _ Syntax Basics - agregate data
  12. 2010-03-04 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] C++ Workshop _ Syntax Basics
  13. 2010-03-05 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] C++ Workshop _ Syntax Basics
  14. 2010-03-05 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] AlphaOne Labs invited you to the event "Ask-a-Sysadmin
  15. 2010-03-06 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Professors Open Source Summer Experience -at-RIT
  16. 2010-03-07 Kevin Mark <kevin.mark-at-verizon.net> Re: [NYLXS - HANGOUT] Professors Open Source Summer Experience -at-RIT
  17. 2010-03-09 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] C++ Workshop _ Syntax Basics Structs Unions and
  18. 2010-03-09 From: "Beau Gould" <bg-at-capitalmarketsp.com> Subject: [NYLXS - HANGOUT] [JOB] System Administrator, NYC to 90k
  19. 2010-03-09 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] [JOB] System Administrator, NYC to 90k
  20. 2010-03-10 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] C++ Workshop _ Syntax Basics Structs Unions
  21. 2010-03-13 redpill <redpill-at-rcn.com> Subject: [NYLXS - HANGOUT] NYLXS Library?
  22. 2010-03-13 redpill <redpill-at-rcn.com> Subject: [NYLXS - HANGOUT] NYLXS Library?
  23. 2010-03-14 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  24. 2010-03-14 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  25. 2010-03-15 redpill <redpill-at-rcn.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  26. 2010-03-15 redpill <redpill-at-rcn.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  27. 2010-03-15 Contrarian <adrba-at-nyct.net> Re: [NYLXS - HANGOUT] NYLXS Library?
  28. 2010-03-15 Contrarian <adrba-at-nyct.net> Re: [NYLXS - HANGOUT] NYLXS Library?
  29. 2010-03-15 Contrarian <adrba-at-nyct.net> Re: [NYLXS - HANGOUT] NYLXS Library?
  30. 2010-03-15 Contrarian <adrba-at-nyct.net> Re: [NYLXS - HANGOUT] NYLXS Library?
  31. 2010-03-15 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  32. 2010-03-15 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  33. 2010-03-15 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  34. 2010-03-16 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] C++ Workshop _ Syntax Basic: Flow Control Structures
  35. 2010-03-16 Ron Guerin <ron-at-vnetworx.net> Subject: [NYLXS - HANGOUT] NYLUG Workshop / Hacking Society (Smalltalk, C++, Python) Tuesday March 16 6:00PM-8:00PM
  36. 2010-03-16 redpill <redpill-at-rcn.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  37. 2010-03-16 redpill <redpill-at-rcn.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  38. 2010-03-17 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] C++ Workshop - Switches and Break
  39. 2010-03-17 einker <eminker-at-gmail.com> Subject: [NYLXS - HANGOUT] Revolution OS at Darress Theatre
  40. 2010-03-20 Ron Guerin <ron-at-vnetworx.net> Subject: [NYLXS - HANGOUT] Free Software Round Table TONIGHT at 10PM (live streaming)
  41. 2010-03-21 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] C++ Workshop - Syntax Basics -- functions
  42. 2010-03-21 Kevin Mark <kevin.mark-at-verizon.net> Re: [NYLXS - HANGOUT] C++ Workshop - Syntax Basics -- functions
  43. 2010-03-21 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] C++ Workshop - Syntax Basics -- functions
  44. 2010-03-21 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] C++ Workshop - Syntax Basics -- functions
  45. 2010-03-21 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  46. 2010-03-21 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  47. 2010-03-21 Kevin Mark <kevin.mark-at-verizon.net> Re: [NYLXS - HANGOUT] C++ Workshop - Syntax Basics -- functions
  48. 2010-03-21 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] C++ Workshop - Syntax Basics -- functions
  49. 2010-03-21 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Tina Gasperson commented on Darin Gasperson's status...
  50. 2010-03-21 redpill <redpill-at-rcn.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  51. 2010-03-22 From: "Beau Gould" <bg-at-capitalmarketsp.com> Subject: [NYLXS - HANGOUT] [JOB] Systems Engineer, NYC | 90-100k
  52. 2010-03-23 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  53. 2010-03-24 einker <eminker-at-gmail.com> Subject: [NYLXS - HANGOUT] Free Software Award Winners Announced
  54. 2010-03-24 einker <eminker-at-gmail.com> Subject: [NYLXS - HANGOUT] Free Software Award Winners Announced
  55. 2010-03-25 redpill <redpill-at-rcn.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  56. 2010-03-25 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] NYLXS Library?
  57. 2010-03-25 swd <sderrick-at-optonline.net> RE: [NYLXS - HANGOUT] NYLXS Library?
  58. 2010-03-30 Ron Guerin <ron-at-vnetworx.net> Subject: [NYLXS - HANGOUT] NYLUG Workshop / Hacking Society (Smalltalk, C++, Python) Tuesday March 30 6:00PM-8:00PM

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!