Board index » cppbuilder » Re: re:Halting Screen Output

Re: re:Halting Screen Output


2004-11-02 07:52:44 PM
cppbuilder28
"Lerna" < XXXX@XXXXX.COM >wrote:
Quote

[...] I am examining the results obtained from the equation
r = ks(1-s) when r is repeatedly fed back into the equation
(as a new s). [...]
Then just move that block of code into a button click:
void __fastcall TForm5::Button1Click(TObject *Sender)
{
int Row = 1, LoopLimit = 40;
long double k = 3.2, s = 0.9;
for( int x = 1; x < LoopLimit; ++x )
{
s = k * s * (1 - s);
StringGrid1->Cells[ 0 ][ Row ] = IntToStr( LoopLimit );
StringGrid1->Cells[ 1 ][ Row ] = IntToStr( x );
StringGrid1->Cells[ 2 ][ Row ] = FormatFloat( "0.0000000000", k );
StringGrid1->Cells[ 3 ][ Row ] = FormatFloat( "0.00000000000000000000", s );
if( Row == 20 )
{
if( MessageDlg("Paused.\nContinue ?", mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0) != mrYes ) return;
Row = 1;
}
else ++Row;
}
}
~ JD
 
 

Re:Re: re:Halting Screen Output

Thanks again JD
A great help. I feel I am on my way at last!
"JD" < XXXX@XXXXX.COM >wrote in message
Quote

"Lerna" < XXXX@XXXXX.COM >wrote:
>
>[...] I am examining the results obtained from the equation
>r = ks(1-s) when r is repeatedly fed back into the equation
>(as a new s). [...]

Then just move that block of code into a button click: