For loop iterator variable is changeable and it ignores the condition [i to x] and runs endless!
Have a look:
for i := 0 to 10 do
begin
writeln(i);
i := i + 1; ---------------------> actually this shouldnt work!
end;
When i gets the value of 10, it just ignores the condition of: i to 10 and just continue running, even i gets the value of 11 and more
2)I dont actually know if this is a bug, but when i call DisposeAndNil(myRawIntPtr) it doesnt compile and throws some errors like: âError: Unknow type element 138â
3)This case im not sure as well if this is by design or a bug, however:
When i want to create a custom rangetype, like:
TCustomRange = -1..10000;
var v: TCustomRange ;
//when i press Start, it throws this error:
//"E(0) Internal Error: Unknown type ID: f"
4)This case im not sure as well if this is by design or a bug, however:
When i want to create a custom set of type, like:
//------------------------------> was possible in Delphi/fpc/objectpascal as well
TMySet = set of integer; //or
TAlphabet = set of 'A'..'Z'; //was possible in Delphi and other Pascal dialect
5)This case im not sure as well if this is by design or a bug, however:
When i want to create a custom variant (C/C++ Union) type, like:
TUnionType = record //------------------------------> was possible in Delphi/fpc/objectpascal as well
case IsTrue: boolean of
True: (field1, field2, field3..fieldn: string);
False: (field1: array[1..8] of byte);
end;
We do supports sets, but only for limited subset, sets of integer shouldnât be possibly in any language as it would take 2^32 bits, ie 536870912 bytes of memory.
We donât support union types (not like that at least). On .NET we support FieldOffset/StructLayout, and on Island and Toffee we support [Union] as an attribute which makes each field in the struct be laid out at 0 (like union in c)
Could you reintroduce the goto,labelstatements, for instance, as an extra compiler option or something like that, the thing is, why i am still interessted in those low-level concepts are, you have so much possibilities for own implementations, ideas and optimized, and well performed code, WHEN you know what you are doing^^
PS:
But DisposeAndNIl(âŚ) doesnt even work for classes, nevermind which type of.
the ; after : is required since we had : as an operator before introducing label. It can however also be used to break/continue out of multi level loops:
outerloop:
for i: Integer := 0 to 10 do begin
for j: Integer := 0 to 15 do begin
... break outerloop;
end;
end;
Im pretty impressed how fast and precisely you work!
Would it be a point, to reintroduce the Mark âLabelâ for goto statements, IMHO its more symantic-sugar ^^
But just a little peek, would also not being a problem when not.
Label ABC:
ABC:
begin
//code which gets executed when gotois reached
end;
//More code....
goto ABC