Create a two-dimensional array at runtime: Difference between revisions
Create a two-dimensional array at runtime (view source)
Revision as of 08:23, 29 February 2024
, 3 months ago→{{header|Objeck}}
(Added Easylang) |
|||
Line 2,409:
=={{header|Objeck}}==
<syntaxhighlight lang="objeck">
class TwoDimArray {
rows := Standard->ReadLine()->ToInt();
cols := Standard->ReadLine()->ToInt();
▲ function : Main(args : System.String[]) ~ Nil {
Standard->Print("The number at place: ")->PrintLine(array[0,0]);
▲ }
▲ array : Int[,] := Int->New[x, y];
▲ array[0, 0] := 2;
}
}
|