Paco103
12-05-2003, 12:52 AM
Ok - another obscure language for me:)
Anyway - I'm trying to write a turing machine emulator in Oberon-2. So far I really don't like the language. It seems to be very static. All I need is a dynamic ARRAY of strings (which in this language is a dynamic 2D array of characters). The problem is, the language won't let me build an array unless I know it's size AT compile time, and I won't know it until run time. My options are to make an insanely huge 2d array, or to make a dynamic array. I don't need to be resizing during runtime, when I need a new size it's because I'll need all new data, so I'll just build a new one. This stupid language won't allow variables for size declerations though. ONLY strict hard coded numbers are allowed.
Anyone that has any ideas or reference resources, knows anything about Oberon or Pascal, or is just a programming genius - your help would be appreciated. Unfortunately this is due next week (and no it's not from me putting it off, we only had about 2).
Anyway - I'm trying to write a turing machine emulator in Oberon-2. So far I really don't like the language. It seems to be very static. All I need is a dynamic ARRAY of strings (which in this language is a dynamic 2D array of characters). The problem is, the language won't let me build an array unless I know it's size AT compile time, and I won't know it until run time. My options are to make an insanely huge 2d array, or to make a dynamic array. I don't need to be resizing during runtime, when I need a new size it's because I'll need all new data, so I'll just build a new one. This stupid language won't allow variables for size declerations though. ONLY strict hard coded numbers are allowed.
Anyone that has any ideas or reference resources, knows anything about Oberon or Pascal, or is just a programming genius - your help would be appreciated. Unfortunately this is due next week (and no it's not from me putting it off, we only had about 2).