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 ');
ex1-output:54321 While Else
ex2:
I:=5;
while(I>0) do
begin
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
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
I'm in tomorrow, we can take a look then.
Kind regards,
Paul
On 08/10/15 14:33, 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;
On 08.10.2015 17:37, MohsenTi wrote:
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
Ondrej Pokorny wrote:
As Michael has said, adding an extra else or for that matter
otherwise would be a problem.
And what about the inline if? That should be backwards compatible at a
first glance. And it would be a fun thing because the Delphi community
has asked for it for many years
Am 08.10.2015 17:37 schrieb "MohsenTi" :
>
> 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 wouldn't integrate it in the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 08 Oct 2015 16:12:56 +, Mark Morgan Lloyd
(markmll.fpc-de...@telemetry.co.uk) wrote about "Re: [fpc-devel] new
features and facilities" (in ):
> Ondrej Pokorny wrote:
>
> As Michael has said,
Am 08.10.2015 17:43 schrieb "Ondrej Pokorny" :
>
> On 08.10.2015 17:37, MohsenTi wrote:
>>
>> 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
On 08.10.2015 18:54, Sven Barth wrote:
I had the idea to implement inline-if as well. I think the syntax I
selected is derived from Oxygene, but it looks very Pascal and
shouldn't break anything:
left := if expr1 then expr2 else expr3;
Thereby expr1 returns Boolean and expr2 determines the
On 10/8/2015 9:54 AM, Sven Barth wrote:
I had the idea to implement inline-if as well. I think the syntax I
selected is derived from Oxygene, but it looks very Pascal and
shouldn't break anything:
left := if expr1 then expr2 else expr3;
Thereby expr1 returns Boolean and expr2 determines
On 10/8/2015 10:35 AM, Mark Morgan Lloyd wrote:
Indeed, it is even more succinct in C/C++:
x = ? : ;
At which point you'll have various members of the Pascal community
decrying it as too C-like.
Well, the tenary operator as present in C(++) is a shortcut for a simple
if-then-else,
Op 2015-10-08 om 19:25 schreef Dmitry Boyarintsev:
On Thu, Oct 8, 2015 at 12:54 PM, Sven Barth > wrote:
I had the idea to implement inline-if as well. I think the syntax I
selected is derived from Oxygene, but it looks
On Thu, Oct 8, 2015 at 12:54 PM, Sven Barth
wrote:
> I had the idea to implement inline-if as well. I think the syntax I
> selected is derived from Oxygene, but it looks very Pascal and shouldn't
> break anything:
>
> left := if expr1 then expr2 else expr3;
>
>
David W Noon wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 08 Oct 2015 16:12:56 +, Mark Morgan Lloyd
(markmll.fpc-de...@telemetry.co.uk) wrote about "Re: [fpc-devel] new
features and facilities" (in ):
Ondrej Pokorny wrote:
As
Thank you Sven,
is there any documentation about freepascal compiler parts ?
On Thu, Oct 8, 2015 at 8:27 PM, Sven Barth
wrote:
> Am 08.10.2015 17:37 schrieb "MohsenTi" :
> >
> > I know this issue but with changing some of structures, I can
Ralf Quint wrote:
On 10/8/2015 9:54 AM, Sven Barth wrote:
I had the idea to implement inline-if as well. I think the syntax I
selected is derived from Oxygene, but it looks very Pascal and
shouldn't break anything:
left := if expr1 then expr2 else expr3;
Thereby expr1 returns Boolean and
On 06/10/15 20:50, Edmund Grimley Evans wrote:
But perhaps you'll want to consider fpc-x86_64-cprt0.patch (attached)
for the trunk. I can confirm that it doesn't break Debian's build.
Perhaps someone else can test it in some other way.
I've run the testsuite and didn't see any regressions on
On Thu, 8 Oct 2015, Sven Barth wrote:
Am 08.10.2015 19:10 schrieb "Ralf Quint" :
On 10/8/2015 9:54 AM, Sven Barth wrote:
I had the idea to implement inline-if as well. I think the syntax I
selected is derived from Oxygene, but it looks very Pascal and shouldn't
Michael Van Canneyt wrote:
On Thu, 8 Oct 2015, Sven Barth wrote:
Am 08.10.2015 19:10 schrieb "Ralf Quint" :
On 10/8/2015 9:54 AM, Sven Barth wrote:
I had the idea to implement inline-if as well. I think the syntax I
selected is derived from Oxygene, but it looks
Am 08.10.2015 19:10 schrieb "Ralf Quint" :
>
> On 10/8/2015 9:54 AM, Sven Barth wrote:
>>
>>
>> I had the idea to implement inline-if as well. I think the syntax I
selected is derived from Oxygene, but it looks very Pascal and shouldn't
break anything:
>>
>> left := if expr1
On 10/8/2015 2:07 PM, Sven Barth wrote:
And you think C's ternary would be more Pascal?
Well, no.
While I use the ternary operator quite a bit when using C, as it IMHO
allows for a cleaner formatting of code there, in Pascal, I always use a
cleanly formatted If-then-else.
Ralf
---
This
On Thu, 8 Oct 2015, Mark Morgan Lloyd wrote:
Michael Van Canneyt wrote:
On Thu, 8 Oct 2015, Sven Barth wrote:
Am 08.10.2015 19:10 schrieb "Ralf Quint" :
On 10/8/2015 9:54 AM, Sven Barth wrote:
I had the idea to implement inline-if as well. I think the syntax I
On 08/10/2015 23:18, Mark Morgan Lloyd wrote:
Michael Van Canneyt wrote:
Let me explain. If I see
If expr1 then expr2 else expr3
it says 'statement' to me. But
a ? b : c;
Says "expression" to me.
The way I look at it is that it's restoring a feature that was
(possibly accidentally)
24 matches
Mail list logo