On Thu, 8 Oct 2015, Mohsen wrote:
Hi!
I wanna add new features and facilities to pascal like while - else, for -
else and inline if statement like python.
examples
ex1:
I:=5;
while(I>0) do
begin
Write(I);
I:=I-1;
end else Write(' While Else ');
This cannot be implemented without breaking the language.
I:=5:
If (I<5) then
while(I>0) do
begin
Write(I);
I:=I-1;
end
else
Write(' While Else ');
Will not work correctly any more if you want to implement your idea.
So this extension is not possible without breaking backwards compatibility.
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel