Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
January 18th, 2011, 12:35 PM
 soC0pth
Registered User

Join Date: Jan 2011
Location: California
Posts: 1
Time spent in forums: 28 m 43 sec
Reputation Power: 0
DrRacket Help

I am trying to teach myself programming using the "How To Design Programs" book which utilizes DrRacket. I am trying to complete an exercise where you define a program that converts Fahrenheit to Celsius, I got everthing to work except the file conversion, where it takes data from a file "in.dat" , converts the numbers and writes them to a new file "out.dat" When I run the command it looks like it is successful but then I go to the file, and there is no "out.dat" doc. Can someone tell me what is wrong?

Code:
``` (define (Fahrenheit->Celsius f)
(/ (* (- f 32) 5) 9))

(convert-file "in.dat" Fahrenheit->Celsius "out.dat")
```

#2
October 22nd, 2011, 01:39 AM
 kody.dalin
Registered User

Join Date: Oct 2011
Posts: 1
Time spent in forums: 13 m 47 sec
Reputation Power: 0
is that everything?

Quote:
 Originally Posted by soC0pth I am trying to teach myself programming using the "How To Design Programs" book which utilizes DrRacket. I am trying to complete an exercise where you define a program that converts Fahrenheit to Celsius, I got everthing to work except the file conversion, where it takes data from a file "in.dat" , converts the numbers and writes them to a new file "out.dat" When I run the command it looks like it is successful but then I go to the file, and there is no "out.dat" doc. Can someone tell me what is wrong? Code: ``` (define (Fahrenheit->Celsius f) (/ (* (- f 32) 5) 9)) (convert-file "in.dat" Fahrenheit->Celsius "out.dat") ```

is this your entire code? if so i beleive that may be the issue. i only gave that section a brief glance but it looked like three functions were required to fully preform this task. i hoep this helps!

 Viewing: Dev Shed Forums > Other > Beginner Programming > DrRacket Help