Disammbler und Simulator angepasst. Arrays begonnen (defunct)

This commit is contained in:
2025-10-13 12:09:15 +02:00
parent 3cb6373915
commit 74f256efb2
50 changed files with 534 additions and 75 deletions

View File

@ -18,5 +18,24 @@ public enum VarType {
TIME_OF_DAY = 18, // Tageszeit (TOD) -> TimeSpan / DateTime
TOD = TIME_OF_DAY,
DATE_AND_TIME = 19,// Datum + Uhrzeit (DT) -> DateTime
DT = DATE_AND_TIME
DT = DATE_AND_TIME,
// Array marker - actual array types use ArrayType class
ARRAY = 20
}
// Represents an array type in structured text
public class ArrayType {
public VarType ElementType { get; set; } // Type of array elements
public int Start { get; set; } // Start index
public int End { get; set; } // End index
public int Length => End - Start + 1; // Number of elements
public ArrayType(VarType elementType, int start, int end) {
ElementType = elementType;
Start = start;
End = end;
if (end < start) throw new System.ArgumentException("Array end index must be greater than or equal to start index");
}
public override string ToString() => $"ARRAY [{Start}..{End}] OF {ElementType}";
}