
-----------------------------------
Jimbo 420
Mon Jun 05, 2006 1:15 pm

fonebook
-----------------------------------
records information to a file creating a fonebook
saves as friends. txt

-----------------------------------
Mr. T
Mon Jun 05, 2006 7:09 pm

Alex's Opinion
-----------------------------------
Mind changing your signature.  :naughty:

-----------------------------------
Clayton
Mon Jun 05, 2006 8:35 pm


-----------------------------------
as stated above, plz change ur signature :( plz read 
put "Please enter your first name"
get firstName


this will not cover inputs such as "Joe Bloe" "Suzie Sue" etc, if looking for string input its a good idea to do this


put "Please enter first name"
get firstName:*


now about your exit condition


exit when firstName="zzz"


this doesnt cover inputs like "zZz" or "ZZZ" etc, its a better idea to use a getch statement or use Str.Upper or Str.Lower to check for exit conditions 

check the Turing Walkthrough to find new ways to improve this program and expand your programming skills :D

-----------------------------------
_justin_
Tue Jun 06, 2006 11:31 am


-----------------------------------
accutly for his exit statement the teacher told us to just use zzz as a exit  8-)

-----------------------------------
wtd
Tue Jun 06, 2006 12:21 pm


-----------------------------------
So if your teacher tells you to program poorly, you'll place complying with that more highly than getting a good education?

One of the most important things to remember when writing a program is that it must be robust.  One component of this is that your program should work correctly, even with input that is slightly different than you were expecting.

User input can never be trusted to be perfectly formatted.

In this case, it's also very easy to make your program more robust.  Simply make the entire input string lower-case, then check to see if it equals "zzz".  This will catch "Zzz", "zZz", etc.

-----------------------------------
TheOneTrueGod
Tue Jun 06, 2006 2:34 pm


-----------------------------------
Unfortunately, some teachers can be quite stubborn.  For example, My grade 10/11 compsci teacher wouldn't let us use anything with a "." in it.  That includes things like View.Set or Input.KeyDown...   Or Str.Lower in this case. (I know you can just create your own Str.Lower function, but for something like Input.KeyDown, it could mean remaking the entire program...)

Still, you shouldn't post in-school assignments without polishing them up first. (Or anything really... :P)

-----------------------------------
_justin_
Tue Jun 06, 2006 3:44 pm


-----------------------------------
yea i see what you guys mean it is just that the teacher always says use "zzz" as the senital 

but wtd you make a real good point here
