Hi,<br><br>I have a file : "data.ss" where we can found just this (one constant) :<br>(Contact 25)<br><br>In beginning of my program, I read "data.ss" to load my constant like this :<br>_________________________________<br>
(define NBCONTACT <br> (when (file-exists? "data.ss" )<br> (call-with-input-file "data.ss" (...)<br>_________________________________<br><br>No problems with this. (equal? NBCONTACT 25) --> #t<br>
<br><br>
But I want to add a new contact:<br>I try this :<br><br>(define (reload a)<br> (when (file-exists? "data.ss" )<br> (call-with-output-file "data.ss"<br>
(lambda (p-out)<br> (fprintf p-out "(Contact ~a)\n" a)) 'replace)))<br><br>reload = replace new value in data.ss.<br>I do (reload 98):<br><br>And now <u>if I open </u>"data.ss", I can see new values for Contact, I see (Contact 99) <br>
<br>but if i tell NBCONTACT I have the old values !!!!! 25 <br>
<br>My question is : How to make a method who refresh or reload the data.ss file (without recompil my main )<br>Because I want create an executable when my program will be finish !! <br><br><br>Thanks <br><br><br><br>
<br>