I know this issue but with changing some of structures, I can implement it and now I only want testing adding features to compiler and don't care about backward compatibility,just testing.
I added some changes to compiler functions and classes like pstatmnt.while_statement and nflw.twhilerepeatnode but need more information about functions and units. Mohsen Timar On Thu, Oct 8, 2015 at 6:28 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: > > > 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 >
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel