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

2015-10-13 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-13 Thread Michael Van Canneyt
On Mon, 12 Oct 2015, wkitt...@windstream.net wrote: 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

Re: [fpc-devel] new features and facilities

2015-10-13 Thread 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 that case the IfThen or IIF() or somesuch has my absolute top preference, followed by ternary.

Re: [fpc-devel] new features and facilities

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

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

2015-10-13 Thread Sven Barth
Am 13.10.2015 08:36 schrieb "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"

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

2015-10-13 Thread Mark Morgan Lloyd
wkitt...@windstream.net wrote: On 10/13/2015 04:32 AM, Michael Van Canneyt wrote: On Mon, 12 Oct 2015, wkitt...@windstream.net wrote: 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,

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

2015-10-13 Thread wkitty42
On 10/13/2015 04:32 AM, Michael Van Canneyt wrote: On Mon, 12 Oct 2015, wkitt...@windstream.net wrote: 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

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

2015-10-13 Thread David W Noon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 12 Oct 2015 22:34:03 -0300, Flávio Etrusco (flavio.etru...@gmail.com) wrote about "Re: [fpc-devel] Fwd: While - Otherwise Statement" (in

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

2015-10-13 Thread David W Noon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 12 Oct 2015 21:32:07 -0400, Wkitty42 (wkitt...@windstream.net) wrote about "Re: [fpc-devel] Fwd: While - Otherwise Statement" (in <561c5f17.4070...@windstream.net>): [snip] > that looks very much like what some would consider goto >

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

2015-10-13 Thread Ralf Quint
On 10/13/2015 1:32 AM, Michael Van Canneyt wrote: I don't understand why anyone would want this marginal functionality and thus (again) needlessly complicates the language, but hey, it's a (mostly) free world Alas, the monstrosity that Object Pascal syntax is becoming is less and less

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

2015-10-13 Thread wkitty42
On 10/13/2015 09:40 AM, Mark Morgan Lloyd wrote: wkitt...@windstream.net wrote: a... my bad... sorry 'bout that... i've been thinking about this, too... 'else' and 'otherwise' mean the same thing... what they seem to be looking for is 'aswell'... foo := 0; while foo < 100 do begin

Re: [fpc-devel] adding a new token to compiler cause exception

2015-10-13 Thread Jonas Maebe
On 13/10/15 19:59, Mohsen wrote: if (idtoken in [_EXPORT,_EXTERNAL,_WEAKEXTERNAL,_PUBLIC,_CVAR]) then ptconst.pas(95,45) Error: range check error in set constructor or duplicate set element how to solve it ? Pascal sets can only contain values/enumerations whose ordinal value is <= 255.

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

2015-10-13 Thread Martin Frb
wkitt...@windstream.net wrote: a... my bad... sorry 'bout that... i've been thinking about this, too... 'else' and 'otherwise' mean the same thing... what they seem to be looking for is 'aswell'... foo := 0; while foo < 100 do begin inc(foo); end; aswell begin dec(foo);

Re: [fpc-devel] adding a new token to compiler cause exception

2015-10-13 Thread MohsenTi
I want to add two overloadable operators “>>” and “<<” to use them as “shr” and “shl” ,or writing into and reading from streams and the other functions like those mentioned above. در تاریخ ۱۳ اکتبر ۲۰۱۵ ۲۲:۲۱، "Sven Barth" نوشت: > Am 13.10.2015 19:59 schrieb "Mohsen"

[fpc-devel] adding a new token to compiler cause exception

2015-10-13 Thread Mohsen
Hi I need add two token to compiler to implement my ideas. adding first token done but second token cause range check exception in lines like this if (idtoken in [_EXPORT,_EXTERNAL,_WEAKEXTERNAL,_PUBLIC,_CVAR]) then ptconst.pas(95,45) Error: range check error in set constructor or duplicate

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

2015-10-13 Thread Sven Barth
Am 13.10.2015 19:21 schrieb : >> >> If somebody really has to do this wouldn't "also" be a better choice to avoid >> (getting close to overloading "as"? :-/ > > > it might... i don't know anything about "as" because i've never used it... what does it do? It's an operator

Re: [fpc-devel] adding a new token to compiler cause exception

2015-10-13 Thread Sven Barth
Am 13.10.2015 19:59 schrieb "Mohsen" : > > Hi > I need add two token to compiler to implement my ideas. > adding first token done but second token cause range check exception in lines like this > > if (idtoken in [_EXPORT,_EXTERNAL,_WEAKEXTERNAL,_PUBLIC,_CVAR]) then > >

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

2015-10-13 Thread Michael Van Canneyt
On Tue, 13 Oct 2015, Martin Frb wrote: wkitt...@windstream.net wrote: a... my bad... sorry 'bout that... i've been thinking about this, too... 'else' and 'otherwise' mean the same thing... what they seem to be looking for is 'aswell'... foo := 0; while foo < 100 do begin

Re: [fpc-devel] adding a new token to compiler cause exception

2015-10-13 Thread Sven Barth
Am 13.10.2015 21:51 schrieb "Jonas Maebe" : > > On 13/10/15 19:59, Mohsen wrote: >> >> if (idtoken in [_EXPORT,_EXTERNAL,_WEAKEXTERNAL,_PUBLIC,_CVAR]) then >> >> ptconst.pas(95,45) Error: range check error in set constructor or >> duplicate set element >> >> how to solve

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

2015-10-13 Thread Dmitry Boyarintsev
On Tue, Oct 13, 2015 at 5:25 PM, Michael Van Canneyt wrote: > However, I seem to be one of the very few thinking this given the > enthousiasm with which people are discussing this. > Even Niklaus Wirth regrets about bloating languages:

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

2015-10-13 Thread Mattias Gaertner
On Tue, 13 Oct 2015 23:25:03 +0200 (CEST) Michael Van Canneyt wrote: >[...] > The argument that we can refrain from using these new features does not hold, > because other people will be using it, and we will have to know all of it to > be able to understand their code.

Re: [fpc-devel] new features and facilities

2015-10-13 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