So far I know that arraytypes in Pascal is declared with an array length, but is there functions which might cannot be implemented because of that? and maybe still be written in C# for example?
Hi marcov,I mean the static arraySo as you text I can declare an array type as: type somearray = array [2..10] of integerSo I'm looking for an example of a function which cannot be written in pascal because of this type declaration, but on the other hand is possible to write in C# instead.
HiOk then:Code: Pascal [Select][+][-]var a: array[2..10] of byte; Idx: integer;begin for Idx:= 2 to 10 do begin a[Idx]:= Idx; writeln('Array of index: ',a[Idx]); end;end; Sometimes life is easy Regards Benny
So I'm looking for an example of a function which cannot be written in pascal because of this type declaration, but on the other hand is possible to write in C# instead.
So far I know that arraytypes in Pascal is declared with an array length...
What is the question again? A limitation of static arrays in pascal, that does not exists in c#?
Quote from: italyrobert on March 12, 2021, 04:05:20 pmSo far I know that arraytypes in Pascal is declared with an array length...'Not always. Dynamic arrays are supported in Free Pascal.What are you actually trying to find out?
The static type array declaration in pascal, as I understand make it not possible to implement certain functions and I'm looking for an simple example of a function like that, but it should instead be possible to implement in C# instead,.