Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Jonas Maebe
Sven Barth wrote: The intrafunctional gotos not really. But the interfunctional ones (modeswitch nonlocalgoto in 2.7.1+) might mess with managed types ;) The compiler should give an error if you try to "goto" out of or into a frame than needs initialisation/finalisation. Jonas _

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Sven Barth
Am 13.10.2015 03:34 schrieb "Flávio Etrusco" : > > On Mon, Oct 12, 2015 at 7:15 PM, David W Noon > wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Mon, 12 Oct 2015 15:11:18 -0400, Wkitty42 (wkitt...@windstream.net) > > wrote about "Re: [fpc-devel] Fwd: While - Otherwise Sta

Re: [fpc-devel] new features and facilities

2015-10-12 Thread Sven Barth
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

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Flávio Etrusco
On Mon, Oct 12, 2015 at 7:15 PM, David W Noon wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Mon, 12 Oct 2015 15:11:18 -0400, Wkitty42 (wkitt...@windstream.net) > wrote about "Re: [fpc-devel] Fwd: While - Otherwise Statement" (in > <561c05d6.4010...@windstream.net>): > >> On 10/12

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread wkitty42
On 10/12/2015 06:15 PM, David W Noon wrote: On Mon, 12 Oct 2015 15:11:18 -0400, Wkitty42 (wkitt...@windstream.net) wrote about "Re: [fpc-devel] Fwd: While - Otherwise Statement" (in <561c05d6.4010...@windstream.net>): On 10/12/2015 02:02 PM, Dmitry Boyarintsev wrote: The next step would proba

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread wkitty42
On 10/12/2015 05:19 PM, Sven Barth wrote: Am 12.10.2015 22:48 schrieb mailto:wkitt...@windstream.net>>: > anyway, it seems that no matter what the discussion, it won't make it into the compiler... that according to another post from a compiler dev ;) I said that I'm not sure. it wasn't you th

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread David W Noon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 12 Oct 2015 23:15:31 +0100, David W Noon (david.w.n...@googlemail.com) wrote about "Re: [fpc-devel] Fwd: While - - Otherwise Statement" (in <561c3103.1060...@googlemail.com>): [snip] > IF some_condition THEH IF another_condition THEH IF > some

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread David W Noon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 12 Oct 2015 15:11:18 -0400, Wkitty42 (wkitt...@windstream.net) wrote about "Re: [fpc-devel] Fwd: While - Otherwise Statement" (in <561c05d6.4010...@windstream.net>): > On 10/12/2015 02:02 PM, Dmitry Boyarintsev wrote: >> >> The next step woul

Re: [fpc-devel] new features and facilities

2015-10-12 Thread 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 different but the intrinsic principle > > IMHO is best) > > > Bu

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Sven Barth
Am 12.10.2015 22:48 schrieb : > anyway, it seems that no matter what the discussion, it won't make it into the compiler... that according to another post from a compiler dev ;) I said that I'm not sure. Right now I'm considering that mostly as way for the author to learn about the ways to extend t

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Sven Barth
Am 12.10.2015 21:43 schrieb "Martin Frb" : >> The only drawback is that "cond" is calculated twice instead of once >> before the actual loop body -- not all will be happy.. ;-) >> > Thats an issue for the optimizer. no need to change the language. The optimizer might not be able to do anything if

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread wkitty42
On 10/12/2015 04:10 PM, Dmitry Boyarintsev wrote: On Mon, Oct 12, 2015 at 3:47 PM, mailto:wkitt...@windstream.net>> wrote: by checking the value that caused the break ;) deity knows i've done it many times before back in the TP/BP 6&7 days... i did it exactly as described, too... we

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread wkitty42
On 10/12/2015 03:43 PM, Martin Frb wrote: Actually the above does not represent what the actual feature request is about The "else" is to be executed, after the while (even if the while looped ZERO times). But it is to be skipped if the while exited via break (and only then). For that reason "e

Re: [fpc-devel] new features and facilities

2015-10-12 Thread Dmitry Boyarintsev
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

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Dmitry Boyarintsev
On Mon, Oct 12, 2015 at 3:47 PM, wrote: > by checking the value that caused the break ;) deity knows i've done it > many times before back in the TP/BP 6&7 days... i did it exactly as > described, too... we had to do it that way as there is/was no other way to > do it ;) That's exactly the thin

Re: [fpc-devel] new features and facilities

2015-10-12 Thread Marco van de Voort
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

Re: [fpc-devel] new features and facilities

2015-10-12 Thread Marco van de Voort
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

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread wkitty42
On 10/12/2015 03:33 PM, Dmitry Boyarintsev wrote: On Mon, Oct 12, 2015 at 3:11 PM, mailto:wkitt...@windstream.net>> wrote: On 10/12/2015 02:02 PM, Dmitry Boyarintsev wrote: The next step would probably be controlled "break", where a user would be able to specify ho

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Martin Frb
On 12/10/2015 20:01, Max Nazhalov wrote: I can't think of a use case either. And just because another language provides such a solution, does not imply that FPC should. +1 (despite my earlier contribution) Discussion of the feature below, is regardless of it not being desirable (in any form)

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Dmitry Boyarintsev
On Mon, Oct 12, 2015 at 3:11 PM, wrote: > On 10/12/2015 02:02 PM, Dmitry Boyarintsev wrote: > >> >> The next step would probably be controlled "break", where a user would be >> able >> to specify how many nested loops needed to broken from. >> > > ROTFLMAO! if you need or desire something like th

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread wkitty42
On 10/12/2015 02:02 PM, Dmitry Boyarintsev wrote: The next step would probably be controlled "break", where a user would be able to specify how many nested loops needed to broken from. ROTFLMAO! if you need or desire something like that then set a breakcounter and break... in the next outer b

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread wkitty42
On 10/12/2015 01:47 PM, Dmitry Boyarintsev wrote: On Mon, Oct 12, 2015 at 1:35 PM, Ralf Quint wrote: Either the while loop is executed or it isn't, depending in the expression. I don't see an actual use case for any else/otherwise extension to it... You probably want to reread python w

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Max Nazhalov
>> I can't think of a use case either. And just because another language >> provides such a solution, does not imply that FPC should. As to achieving >> the functionality in FPC: >> >> if cond then >>while cond do >> foo >> else >>bar; > >That's what I've thought about from the beginni

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread DaWorm
I guess I'm confused. What is the difference between: while true do this then that and: while true do this that And what is better about: while true do this otherwise/else that and: if true while true do this else that The latter may have a difference if the thing that returns true for

[fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Max Nazhalov
> I can't think of a use case either. And just because another language > provides such a solution, does not imply that FPC should. As to achieving > the functionality in FPC: > > if cond then >while cond do > foo > else >bar; That's what I've thought about from the beginning of this

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Ralf Quint
On 10/12/2015 11:33 AM, Sven Barth wrote: Am 12.10.2015 20:02 schrieb "Dmitry Boyarintsev" mailto:skalogryz.li...@gmail.com>>: > > On Mon, Oct 12, 2015 at 1:54 PM, Ralf Quint > wrote: >> >> Sorry, we are programming here in Pascal, not Python. I could give a rode

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Sven Barth
Am 12.10.2015 20:02 schrieb "Dmitry Boyarintsev" : > > On Mon, Oct 12, 2015 at 1:54 PM, Ralf Quint wrote: >> >> Sorry, we are programming here in Pascal, not Python. I could give a rodent's posterior about what Python implements. >> >> People need to properly design their software, not just hackin

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Marco van de Voort
In our previous episode, Sven Barth said: > world ( > http://docwiki.embarcadero.com/RADStudio/XE3/en/Declarations_and_Statements#Case_Statements) > ?! > > I can see that FPC compiles case-otherwise for any syntax mode. > > It's from Extended ISO Pascal and I don't know for how long it exists in >

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Steve Smith
On 12/10/15 18:47, Dmitry Boyarintsev wrote: On Mon, Oct 12, 2015 at 1:35 PM, Ralf Quint mailto:freedos...@gmail.com>> wrote: Either the while loop is executed or it isn't, depending in the expression. I don't see an actual use case for any else/otherwise extension to it... You p

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Mark Morgan Lloyd
Ralf Quint wrote: On 10/12/2015 10:18 AM, Michael Van Canneyt wrote: That is the meaning of "However, both syntax would cause code incompatibility." and is already in my very first reply to OP. So While... else or While .. Otherwise will never make it in the compiler. Thanks for that. Thi

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Dmitry Boyarintsev
On Mon, Oct 12, 2015 at 1:54 PM, Ralf Quint wrote: > Sorry, we are programming here in Pascal, not Python. I could give a > rodent's posterior about what Python implements. > > People need to properly design their software, not just hacking away. Then > they do not need to come up with whacko sto

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Ralf Quint
On 10/12/2015 10:47 AM, Dmitry Boyarintsev wrote: On Mon, Oct 12, 2015 at 1:35 PM, Ralf Quint > wrote: Either the while loop is executed or it isn't, depending in the expression. I don't see an actual use case for any else/otherwise extension to it...

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Dmitry Boyarintsev
On Mon, Oct 12, 2015 at 1:35 PM, Ralf Quint wrote: > > Either the while loop is executed or it isn't, depending in the > expression. I don't see an actual use case for any else/otherwise extension > to it... > You probably want to reread python while-else implementation. ( https://docs.python.or

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Ralf Quint
On 10/12/2015 10:18 AM, Michael Van Canneyt wrote: That is the meaning of "However, both syntax would cause code incompatibility." and is already in my very first reply to OP. So While... else or While .. Otherwise will never make it in the compiler. Thanks for that. This is s typical exam

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Michael Van Canneyt
On Mon, 12 Oct 2015, Max Nazhalov wrote: On 12.10.2015 17:17 schrieb "Dmitry Boyarintsev" wrote: About while-then. While the syntax is unlikely to break anything, it's inconsistent with if-statement. where, if-then is executed when condition is true. For while-then is executed then conditi

[fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Max Nazhalov
On 12.10.2015 17:17 schrieb "Dmitry Boyarintsev" wrote: > About while-then. While the syntax is unlikely to break anything, it's > inconsistent with if-statement. > where, if-then is executed when condition is true. > For while-then is executed then condition is false. > Thus, while-else or whil

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Sven Barth
Am 12.10.2015 17:17 schrieb "Dmitry Boyarintsev" : > About while-then. While the syntax is unlikely to break anything, it's inconsistent with if-statement. > where, if-then is executed when condition is true. > For while-then is executed then condition is false. > Thus, while-else or while-otherwis

Re: [fpc-devel] Fwd: While - Otherwise Statement

2015-10-12 Thread Dmitry Boyarintsev
On Mon, Oct 12, 2015 at 2:07 AM, Sven Barth wrote: > It's from Extended ISO Pascal and I don't know for how long it exists in > FPC already, but it does so definitely for some time. > Thanks! I've never thought to go and read the FP documentation on "case statement", assuming it works in turbo pa

Re: [fpc-devel] patch for rtl/linux/aarch64/cprt0.as

2015-10-12 Thread Jonas Maebe
Jonas Maebe wrote on Thu, 08 Oct 2015: On 06/10/15 20:50, Edmund Grimley Evans wrote: (So if you've already applied the patch from Debian bug #800811 there will be a conflict.) Apart from the i386 part, this patch could perhaps go into fixes_3_0_ios as it clearly (I hope) only affects AArch64