Re: Basic switch statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12:04 PM -0400 4/13/10, steve_r wrote:
I'm new to programming, drive a truck in the day, now taking night courses
to get a better job for my family.  Please bear with me if this is a dumb
question, I don't have much experience.

-snip-

Sorry for the basic question.

Steve Reilly


Steve:

Please review:

http://php1.net/c/switch/

Note:

1. The value of the switch statement in this case is "true" (it could also be '1'). This is different than what's found in most other case/switch control structures in other languages.

2. Generally you should use functions to process and return values and then decide as to what to do with the results, such as print(). Putting print in functions is fine if the function is supposed to print something.

3. Try to make your variables and function names simple and syntactical -- it will help you later when your code becomes more complex.

Good luck with trying to make a better living programming than driving a truck.

If you want to say thanks for my effort, please answer me this -- with regard to the class you are talking: What is the name of the class? How many credits is it? What's the name of the textbook you are using? And, if there is a syllabus, can I have a copy?

Thanks,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux