Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!usc!oxy!c_wilson From: c_wilson@oxy.edu (Clarence Regis Wilson) Newsgroups: comp.lang.pascal Subject: Fahrenheit Celcius HELP! Message-ID: <51237@tiger.oxy.edu> Date: 2 Oct 89 19:54:11 GMT Organization: Occidental College, Los Angeles, CA 90041 Lines: 17 In article <16846@watdragon.waterloo.edu> someone writes: >I need a simple piece of code to convert a string celsius/fahrenheit >to a fahrenheit/celsius..... > >function convert: integer; >var > value : intger; > letter: char; >begin >value := 0; Here's where you missed an important point. A while statement uses an entry condition, as opposed to a repeat statement which will always execute at least once. A while statement may never execute. You should insert this line: read(letter);