> I make a program and when i run withis code :
>                  r := 1 - probndim(wd,n-start,error);
>                  writeinlog('soil_prob_calc='+floattostr(      r));
>
>                  (probndim makes some calculations)
>  
> the program writes in a log file one value
>
> but when I run with this other code:
>
>                 (with the same parameters values)
>
>       writeinlog('before');
>       r := 1 - probndim(wd,n-start,error);
>       writeinlog('soil_prob_calc='+floattostr( r)); 
>
> the value in the log file is other.
>
> why if  the only difference is writeinlog('before'); and this
> only writes a String in the log file, the behavior is not equal?
>

Without seeing the code for the writeinlog() and probndim() functions,
I'd think that the call to writeinlog() is changing a value in wd, n,
start, error, or some other global variable that gets used in probndim
().

You might want to display those values before and after the call to
writeinlog() in your second example.

The variable names "error" and "start" could be worrisome - I took a
quick look in the help for Delphi 7 and I have about a dozen entries
for Start, and lots also for Error. You might want to use less common
names - it seems every TTom, TDick and THarry class uses a Start or
Error name. Of the two, I'd be more suspicious that "error" is getting
changed. It just seems to be a name used by lots of different classes,
including some exception stuff that you may be indirectly using.


-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]




SPONSORED LINKS
C programming language Computer programming languages Java programming language
The c programming language C programming language Concept of programming language


YAHOO! GROUPS LINKS




Reply via email to