I try to convert some of my old TP programs to FP and Visual input.
For the Matrix input I had the following Code
procedure TForm1.Input(Var N: Integer; Var Coeff_Mat1: Mat_Array;
Var Col_Mat1: Col_Array);
(*** This Procedure lets the user input the number of equations and the ***)
(*** augmented matrix of their system of equations ***)
(*** ON ENTRY : N => number of equations : UNDEFinED
Coeff_Mat1 => coefficient matrix : UNDEFinED
Col_Mat1 => column matrix :UNDEFinED
ON Exit : N => # of equations input by user
Coeff_Mat1 => defined coefficient matrix
Col_Mat1 => defined column matrix input by user ***)
Var
I,J : Integer; (* loop control and Array indices *)
begin
// readln(N);
For I := 1 to N do { row indice }
begin
Writeln('ROW #',I);
For J := 1 to N do {column indice }
begin
Write('a(',I,',',J,'):');
readln(Coeff_Mat1[I,J]); {input of coefficient matrix}
end;
Write('c(',I,'):');
readln(Col_Mat1[I]); {input of Constant matrix}
end;
readln;
end; (* Procedure Input *)
{---------------------------------------------------------------------------}
Has anyone an Idea how this Input can be achieved with visual Controls in a simple way?Can I Use T stringGird? The size of the matrices is variable , the max numbers of equations 50 .If I use TStringGird Can I change the quantity of rows and columns dynamically im Program ,depending on the number of equations N given by the User?
Thanks for the help