The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

jperickson (15) [Avatar] Offline
#1
For example, in Listing 5.7 A switch example, in the switch() function, happy, afraid, etc. do not have quotes around them. This works, but why are they not required? Running mode(feelings[1]) shows that they are characters.
jperickson (15) [Avatar] Offline
#2
Re: Explain when quotation marks are required
Also, I think it would be good to explain if/how you could use a switch with variables. Is this possible? How would it be different since the strings don't need quotes.

This could be a note to experienced programmers.