I am trying to convert a Pascal type to C #. I looked at Google, but I couldn’t find the answer, perhaps because I was looking incorrectly, so sorry if this is a duplicate.
I have two types of Pascal:
type
TVector3i = array [0..2] of longint;
Tcolface = packed record
A, B, C: word;
SurfaceA, SurfaceB: word;
end;
I know
Tcolface = packed record
A, B, C: word;
SurfaceA, SurfaceB: word;
end;
converted to:
struct Tcolface {
ushort A, B, C;
ushort SurfaceA, SurfaceB;
}
but how to TVector3i = array [0..2] of longint;convert?
I try to avoid using / writing the class, since when I convert the rest of the Pascal code, it will expect the type as an array, and I try not to convert it to .xy and. g.
I really did float[] variablename = new float[3];, but as soon as I get it List<float[]> variblename, it gets a little harder.
Full code:
TVector3i = array [0..2] of Longint;
TVector3f = array [0..2] of Single;
TVector3d = array [0..2] of Double;
TVector4i = array [0..3] of Longint;
TVector4f = array [0..3] of Single;
TVector4d = array [0..3] of Double;
TMatrix3i = array [0..2] of TVector3i;
TMatrix3f = array [0..2] of TVector3f;
TMatrix3d = array [0..2] of TVector3d;
TMatrix4i = array [0..3] of TVector4i;
TMatrix4f = array [0..3] of TVector4f;
TMatrix4d = array [0..3] of TVector4d;
Therefore, why am I trying to avoid classes: D