Am 13.10.2015 09:34 schrieb "Michael Van Canneyt" :
>
>
>
> On Mon, 12 Oct 2015, Marco van de Voort wrote:
>
>> In our previous episode, Michael Van Canneyt said:
>
>
> I'm not sure this kind of semantics is possible with a compiler
intrinsic...
>
> But if it is: In th
On Mon, 12 Oct 2015, Marco van de Voort wrote:
In our previous episode, Michael Van Canneyt said:
I'm not sure this kind of semantics is possible with a compiler
intrinsic...
But if it is: In that case the IfThen or IIF() or somesuch has my
absolute top preference, followed by ternary. (a
Am 12.10.2015 23:29 schrieb "Marco van de Voort" :
>
> In our previous episode, Dmitry Boyarintsev said:
> > On Mon, Oct 12, 2015 at 4:01 PM, Marco van de Voort
wrote:
> >
> > > (ifthen clashes name with the delphi functions of the same name in a
much
> > > used unit as math, the name should be di
In our previous episode, Dmitry Boyarintsev said:
> On Mon, Oct 12, 2015 at 4:01 PM, Marco van de Voort wrote:
>
> > (ifthen clashes name with the delphi functions of the same name in a much
> > used unit as math, the name should be different but the intrinsic principle
> > IMHO is best)
> >
> Bu
On Mon, Oct 12, 2015 at 4:01 PM, Marco van de Voort wrote:
> (ifthen clashes name with the delphi functions of the same name in a much
> used unit as math, the name should be different but the intrinsic principle
> IMHO is best)
>
But they're inline functions. Thus when inline-d into the code, th
In our previous episode, Michael Van Canneyt said:
> >>
> >> I'm not sure this kind of semantics is possible with a compiler
> > intrinsic...
> >> But if it is: In that case the IfThen or IIF() or somesuch has my
> > absolute top preference, followed by ternary. (and the If .. then
> > expression s
In our previous episode, Dmitry Boyarintsev said:
> The only Pascal way is
>
> left := IfThen(expr1, expr2, expr3)
I also think intrinsic pseudo function syntax would be best, evaluating
only one expression. Because that is the primary purpose of the ternary.
Making it an operator is just C cop
On 11/10/15 14:22, MohsenTi wrote:
I added more info needed by compiler ,but I don't know what is
executionweight in pass_generate_code function of tcgwhilerepeatnode class
The executionweight is used to determine how often a particular node
will be executed. The higher the value, more often i
Hi
I added new keyword to moderate while - else (otherwise)
new codes is
Ex1:
while( I>5 ) do begin Dec(I); write(I); end otherwise write(' otherwise
while ');
Ex2:
if (I<10) then while( I>5 ) do begin Dec(I); write(I); end otherwise
write(' otherwise while ') else write(' IF ELSE ');
I need
On 10/10/2015 07:12 AM, Mark Morgan Lloyd wrote:
One thing that bothers me about these approaches is that sooner or later some
awkward cuss (such as myself) will start whining about how much better Pascal
would be if there were a decent macro preprocessor so that CaseOf() could be
specialised int
Michael Van Canneyt wrote:
On Sat, 10 Oct 2015, Sven Barth wrote:
Am 10.10.2015 10:51 schrieb "Mark Morgan Lloyd" <
markmll.fpc-de...@telemetry.co.uk>:
Michael Van Canneyt wrote:
On Fri, 9 Oct 2015, Sven Barth wrote:
I'm not sure this kind of semantics is possible with a compiler
intr
On Sat, 10 Oct 2015, Sven Barth wrote:
Am 10.10.2015 10:51 schrieb "Mark Morgan Lloyd" <
markmll.fpc-de...@telemetry.co.uk>:
Michael Van Canneyt wrote:
On Fri, 9 Oct 2015, Sven Barth wrote:
I'm not sure this kind of semantics is possible with a compiler
intrinsic...
But if it is: I
Am 10.10.2015 10:51 schrieb "Mark Morgan Lloyd" <
markmll.fpc-de...@telemetry.co.uk>:
>
> Michael Van Canneyt wrote:
>>
>> On Fri, 9 Oct 2015, Sven Barth wrote:
>>
>>
I'm not sure this kind of semantics is possible with a compiler
>>>
>>> intrinsic...
But if it is: In that case
Michael Van Canneyt wrote:
On Fri, 9 Oct 2015, Sven Barth wrote:
I'm not sure this kind of semantics is possible with a compiler
intrinsic...
But if it is: In that case the IfThen or IIF() or somesuch has my
absolute top preference, followed by ternary. (and the If .. then
expression shoul
Am 09.10.2015 23:11 schrieb "Dmitry Boyarintsev" :
>
> On Fri, Oct 9, 2015 at 5:04 PM, Sven Barth
wrote:
>>
>> Yes a compiler intrinsic could handle that. In the end all three
syntaxes are the same code representation anyway: namely an if-node.
>> The IfThen() intrinsic would be fine with me as we
On Fri, 9 Oct 2015, Sven Barth wrote:
I'm not sure this kind of semantics is possible with a compiler
intrinsic...
But if it is: In that case the IfThen or IIF() or somesuch has my
absolute top preference, followed by ternary. (and the If .. then
expression should be blasted to hell ;) )
On Fri, Oct 9, 2015 at 5:04 PM, Sven Barth
wrote:
> Yes a compiler intrinsic could handle that. In the end all three syntaxes
> are the same code representation anyway: namely an if-node.
> The IfThen() intrinsic would be fine with me as well. Let's call this our
> common ground ;)
>
I wonder if
Am 08.10.2015 19:51 schrieb "MohsenTi" :
>
> Thank you Sven,
> is there any documentation about freepascal compiler parts ?
Nope, sorry. It's mainly learning by doing or maybe learning by debugging...
Regards,
Sven
___
fpc-devel maillist - fpc-devel@l
Am 09.10.2015 20:29 schrieb "Michael Van Canneyt" :
>
>
>
> On Fri, 9 Oct 2015, Dmitry Boyarintsev wrote:
>
>> The only Pascal way is
>>
>> left := IfThen(expr1, expr2, expr3)
>>
>> Similar to addr(), sizeof(), length(), write() and recently added
Default()
>> in intrinsic.
>> I guess functions dec
On Fri, Oct 9, 2015 at 2:45 PM, Dmitry Boyarintsev <
skalogryz.li...@gmail.com> wrote:
> Looking at the assembler code, a=0 is evaluated first.
> If it's true, the code is passed to the next line after assert, w/o
> evaluating 'error '+intToStr(b).
>
And that's the reason why assert() was invente
On Fri, Oct 9, 2015 at 2:30 PM, Michael Van Canneyt
wrote:
I'm not sure this kind of semantics is possible with a compiler intrinsic...
> But if it is: In that case the IfThen or IIF() or somesuch has my absolute
> top preference, followed by ternary. (and the If .. then expression should
> be bl
On Fri, 9 Oct 2015, Dmitry Boyarintsev wrote:
The only Pascal way is
left := IfThen(expr1, expr2, expr3)
Similar to addr(), sizeof(), length(), write() and recently added Default()
in intrinsic.
I guess functions declared in Math unit are not covering all the needs
(since type of expr2, expr
The only Pascal way is
left := IfThen(expr1, expr2, expr3)
Similar to addr(), sizeof(), length(), write() and recently added Default()
in intrinsic.
I guess functions declared in Math unit are not covering all the needs
(since type of expr2, expr3) may vary.
That's why a bit of compiler support
Am 09.10.2015 08:36 schrieb "Michael Van Canneyt" :
>> There also another reason why I prefer the variant with the if: ease to
>> implement in the compiler.
>>
>> For the if one merely needs to add a corresponding case in factor() while
>> for the ?: one needs to fiddle with the compiler's operato
Michael Van Canneyt wrote:
On Fri, 9 Oct 2015, Sven Barth wrote:
Am 08.10.2015 23:48 schrieb "Michael Van Canneyt"
:
Actually, yes I think C's or Javascript's ternary is better suited.
Let me explain. If I see
If expr1 then expr2 else expr3
it says 'statement' to me. But
a ? b : c;
Says "
On Fri, 9 Oct 2015, Sven Barth wrote:
Am 08.10.2015 23:48 schrieb "Michael Van Canneyt" :
Actually, yes I think C's or Javascript's ternary is better suited.
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.
So
le
Am 08.10.2015 23:48 schrieb "Michael Van Canneyt" :
> Actually, yes I think C's or Javascript's ternary is better suited.
>
> 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.
>
> So
>
> left := a ? b : c;
Tha
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) droppe
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
selected is derived from
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 very Pascal and shouldn't
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
break anything:
left :=
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 ema
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 then expr2 else expr3;
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 e
Op 2015-10-08 om 19:25 schreef Dmitry Boyarintsev:
On Thu, Oct 8, 2015 at 12:54 PM, Sven Barth mailto:pascaldra...@googlemail.com>> 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 br
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 implement
> it and now I only want testing adding featur
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, a
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 Michael has said, adding an extra
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;
>
> Thereby expr1 returns Boolean and e
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 the
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 ty
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 compiler, but for playing around
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 testing.
>>
>> I added so
-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, adding an extra else
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 an
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
pstatmn
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.twhilerepeatnod
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;
en
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 withou
49 matches
Mail list logo