Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Michael Schnell
On 11/21/2013 12:38 AM, Sieghard wrote: How big is this C preprocessor ... The question is, how big is a full description :-) (without comments on how to use it :-) :-) :-) ). -Michael -- Shape the Mobile

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Michael Schnell
On 11/21/2013 12:42 AM, Sieghard wrote: That's a rather silly statement. Can you describe an implementation of a jump table mechanism using non-constant positions for its entries? If or if not jump tables are used is up to the compiler. A case _syntax_ easily can be done with non-constants.

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Martin Schreiber
On Thursday 21 November 2013 09:50:30 Michael Schnell wrote: On 11/21/2013 12:42 AM, Sieghard wrote: That's a rather silly statement. Can you describe an implementation of a jump table mechanism using non-constant positions for its entries? If or if not jump tables are used is up to the

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Michael Schnell
On 11/21/2013 10:06 AM, Martin Schreiber wrote: that semantic is independent of order of items. With variable case labels this is not possible. I don't understand what you mean by this. Could you give an example ? Of course non-constants lead to additional logical problems. If a case label

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Michael Schnell
On 11/21/2013 10:47 AM, Martin Schreiber wrote: I don't think so. for me 'case' 'else if'. Don't you like compiler magic ? :-) -Michael -- Shape the Mobile Experience: Free Subscription Software experts and

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Michael Schnell
On 11/20/2013 12:56 AM, Sieghard wrote: You got a funny gcc. Mine doesn't do any preprocessing itself, it needs to call an external program (named cpp) for that purpose. Where does your gcc come from? in fact this is seems to be wrong. Do cp -dumpecs and you will see that it's the

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Ivanko B
gc = GNU C compiler g++ = GNU C++ compiler cpp = GNU C/C++ preprocessor -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Sieghard
Hallo Michael, Du schriebst am Thu, 21 Nov 2013 09:50:30 +0100: Can you describe an implementation of a jump table mechanism using non-constant positions for its entries? If or if not jump tables are used is up to the compiler. A case _syntax_ easily can be done with non-constants.

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Ivanko B
CPP is PREprocessor :) Possibly with some entensions to provide very simple GCC/G++ functionality. Looks into its docs. Me especially consulted in them :) -- Shape the Mobile Experience: Free Subscription Software experts

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Martin Schreiber
On Thursday 21 November 2013 12:11:44 Michael Schnell wrote: On 11/21/2013 10:47 AM, Martin Schreiber wrote: I don't think so. for me 'case' 'else if'. Don't you like compiler magic ? :-) Correct, I don't like compiler magic. :-) Martin

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Michael Schnell
and cpp --help outputs ... -Xassembler argPass arg on to the assembler -Xpreprocessor arg Pass arg on to the preprocessor -Xlinker arg Pass arg on to the linker ... ??? -Michael -- Shape

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-21 Thread Michael Schnell
On 11/21/2013 03:25 PM, Ivanko B wrote: gc = GNU C compiler g++ = GNU C++ compiler cpp = GNU C/C++ preprocessor among other stuff cpp dumpspecs outputs *link_emulation: elf_i386 This does make no sense at all for a preprocessor -Michael

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Michael Schnell
On 11/19/2013 09:31 PM, Sieghard wrote: C doesn't really _have_ enumerated _types_. the compiler seems to think differently as he happily compiles: typedef enum claimUsage_e { LTE_CLAIM_SEM_MGT, LTE_CLAIM_SEM_BASE, LTE_VT_MGT, LTE_VT_BASE } LTE_claimUsage_e; -Michael

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Michael Schnell
On 11/20/2013 12:56 AM, Sieghard wrote: _No_ language can make certain that a preprocessor cannot be used. It can make use of the preprocessor syntax itself (e.g. requiring a # at the start of a line for some purpose) _No_ language should depend on the use of a preprocessor. Right. You got

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Michael Schnell
On 11/19/2013 02:52 PM, Martin Schreiber wrote: It is planned to unify record, object and class in a single concept. Nice and consequently thought out ! -Michael -- Shape the Mobile Experience: Free Subscription

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Michael Schnell
On 11/19/2013 03:53 PM, Martin Schreiber wrote: case can. Having elseif looking like case is evil. I think the contrary: as well with case as with an elseif (or with pure fpc syntax: end else if ... then begin) cascade only one of the multiple alternatives is taken (other then with if test1

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Michael Schnell
On 11/19/2013 06:38 PM, Ivanko B wrote: case can. But case: only accepts (compile time) contants in its labels so its usage is restricted. An improved language could do away with this rather silly restriction -Michael

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Michael Schnell
On 11/20/2013 01:23 AM, Sieghard wrote: They've been just resently removed from Delphi. They were called objects, Objects are not constant but more like static classes. And in fact they have not been removed but replaced by enhancing the record concept to allow for what objects were. Happily

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Ivanko B
silly restriction == Possibly taken to aviod crossing ranges in run-time (not revealed at compile time). -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Marcos Douglas
On Tue, Nov 19, 2013 at 10:12 PM, Sieghard s_c_...@arcor.de wrote: Hallo Marcos, Du schriebst am Tue, 19 Nov 2013 00:25:26 -0200: There's no new ALIAS compiler parameter neccessary. I know there is no new ALIAS parameter... So I'm proposing one. Read completely - there is no ALIAS

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Sieghard
Hallo Michael, Du schriebst am Wed, 20 Nov 2013 11:29:01 +0100: On 11/19/2013 09:31 PM, Sieghard wrote: C doesn't really _have_ enumerated _types_. the compiler seems to think differently as he happily compiles: typedef enum claimUsage_e { LTE_CLAIM_SEM_MGT, LTE_CLAIM_SEM_BASE,

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Sieghard
Hallo Ivanko, Du schriebst am Wed, 20 Nov 2013 10:08:51 +0500: C doesn't really _have_ enumerated _types_ = ? It has the enum type directly. Don't mix it with #DEFINEd constants. enum defines a sequence of symbolic constants, something C doesn't support natively like Pascal

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Sieghard
Hallo Ivanko, Du schriebst am Wed, 20 Nov 2013 10:06:20 +0500: hash code collisions SHA256 too ? Any code that uses fewer bits than the encoded item. Try prove the opposite, and when you succeed, write an article in some high ranking mathematical journal. -- --

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Sieghard
Hallo Michael, Du schriebst am Wed, 20 Nov 2013 12:05:31 +0100: Objects are not constant but more like static classes. And in fact I never said that objects were constant. (They're not static either, as that's an undefined notion with Pascal.) All I said was that you could declare constants

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Sieghard
Hallo Michael, Du schriebst am Wed, 20 Nov 2013 11:45:56 +0100: _No_ language can make certain that a preprocessor cannot be used. It can make use of the preprocessor syntax itself (e.g. requiring a # at the start of a line for some purpose) No, it _cannot_, because these syntactic

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-20 Thread Sieghard
Hallo Michael, Du schriebst am Wed, 20 Nov 2013 11:59:23 +0100: On 11/19/2013 06:38 PM, Ivanko B wrote: case can. But case: only accepts (compile time) contants in its labels so its usage is restricted. An improved language could do away with this rather silly

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Ivanko B
cmd = cmpcompare_type -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Martin Schreiber
On Tuesday 19 November 2013 09:30:22 Ivanko B wrote: Also ELSE IF may spawn a lot of needless END whereas ELIF doesn't need them. They are not needless, they show the nesting. Martin -- Shape the Mobile Experience:

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Michael Schnell
On 11/18/2013 05:26 PM, Martin Schreiber wrote: On Monday 18 November 2013 17:16:03 Ivanko B wrote: Also CASE doesn't accept enumerated type. FPC and MSElang do accept enumerated types. C as well. :-) -Michael --

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Michael Schnell
On 11/18/2013 08:42 PM, Sieghard wrote: Which defeats the intention of case as a _calculated_ selector statement. How the jump is done is up to the compiler optimization not of the syntax. For only a few cases it might use just do multiple compares, For a sequence of numbers with not too many

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Michael Schnell
On 11/18/2013 09:23 PM, Sieghard wrote: Though I doubt that there might be any sufficienty urgent need, can't you _always_ use any external program for preprocessing any of your source files, even be it manually before you compile it? You could even use a program compiled with the compiler

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Michael Schnell
On 11/18/2013 10:53 PM, Sieghard wrote: Now, how can you pass an object that's meant to be kept unaffected by anything happening in the procedure or function? Well, yes, you simply can't. Of course you are right. Maybe inventing constant objects might be a nice extension to Object pascal.

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Michael Schnell
A problem is that gcc supposedly will not detect that the characters between single quotes are a string and should not be handled by the coprocessor. I did not yet research if/how this behavior can be (in fact gcc _can_ compile pascal code !) -Michael

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Martin Schreiber
On Tuesday 19 November 2013 13:16:36 Michael Schnell wrote: On 11/18/2013 10:53 PM, Sieghard wrote: IMHO it would make more sense to add syntax to allow for static classs that are not constructed (on the heap) but just exist when a variable for them is defined (either in global ram or on the

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Martin Schreiber
On Tuesday 19 November 2013 15:31:26 Ivanko B wrote: they show the nesting. = What about we don''t need nesting but instead switch independent alternatives like CASE does ? elseif can not guarantee that semantic is independent of order (do you mean that with switch independent

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Ivanko B
case can. But case: only accepts (compile time) contants in its labels so its usage is restricted. can not guarantee that semantic is independent of order Only in case of crossing ranges. Which can be intended for a particular task BTW.

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Sieghard
Hallo Ivanko, Du schriebst am Tue, 19 Nov 2013 13:30:22 +0500: Also ELSE IF may spawn a lot of needless END whereas ELIF doesn't need That's wrong impression. Assuming any such construct requires a complete block constituted by a begin-end pair, they have exactly the same block structure:

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Sieghard
Hallo Martin, Du schriebst am Tue, 19 Nov 2013 07:05:56 +0100: String case labels sometimes are handy and can be implemented by a hash table for example. Certainly. With today's processor's addressing ranges, you might even be able to compile the hash result into an exhaustive jump table,

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Sieghard
Hallo Michael, Du schriebst am Tue, 19 Nov 2013 12:55:50 +0100: How the jump is done is up to the compiler optimization not of the syntax. Not quite - if you allow such complicated constructs, the compiler has to be complicated - and thus error prone - as well, because it has to be able to

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Sieghard
Hallo Michael, Du schriebst am Tue, 19 Nov 2013 12:45:18 +0100: FPC and MSElang do accept enumerated types. C as well. :-) C doesn't really _have_ enumerated _types_. It has a means to define otherwise unavailable symbolic constants using a syntax looking ephemerally similar to an

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Sieghard
Hallo Marcos, Du schriebst am Tue, 19 Nov 2013 00:25:26 -0200: There's no new ALIAS compiler parameter neccessary. I know there is no new ALIAS parameter... So I'm proposing one. Read completely - there is no ALIAS parameter _neccessary_. Ok. So, please, explain how we can use __TWO__

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Sieghard
Hallo Michael, Du schriebst am Tue, 19 Nov 2013 13:07:41 +0100: Of course (for speed) you should not always use a preprocessor. But the language should take care that the use of the standard preprocessor (in _No_ language can make certain that a preprocessor cannot be used. _No_ language

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Ivanko B
END ELIF cond2 THEN BEGIN ... END = In the new (MSElang) syntax, there'll no BEGIN/END here. -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Ivanko B
hash code collisions SHA256 too ? -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Ivanko B
C doesn't really _have_ enumerated _types_ = ? It has the enum type directly. Don't mix it with #DEFINEd constants. -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Ivanko B
In the new (MSElang) syntax, there'll no BEGIN/END here. = The THEN too :) -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R)

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-19 Thread Ivanko B
So, well have: --- Hmm, THEN here will may be needed for syntax (IF ELIF are same level) consistence: - IF cond1 THEN ... ELIF cond2 THEN ... ELIF cond3 THEN ... ELIF cond4 THEN ... ELSE [THEN ?] ... END;

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Martin Schreiber
On Monday 18 November 2013 08:36:44 Ivanko B wrote: Here a=else a = 2 depend on the decision for a=1 which in turn depends on the one for a=0. So we have 3 hirerarchy levels. To see the effect better me add some more padding: -- if a = 0 then writeln

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
Then use case: = It's INTEGER switch only, AFAIK. And compare expressions may differentiate - the case can't provide that and it hides nesting levels. == In the example no levels but the top one are expected.

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Martin Schreiber
On Monday 18 November 2013 09:22:08 Ivanko B wrote: Then use case: = It's INTEGER switch only, AFAIK. And compare expressions may differentiate - the case can't provide that In FPC and possibly in MSElang strings work too. and it hides nesting levels. == In

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
strings == Not strings but chars (convertable to integer). And case doesn't allow changing/extending comprare expressions for conditions. mostlikely does not what the inventor intended. ;-) == First matched branch will be executed :) The same as if else but with much

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
*are* nested === They're nested not more than branches of CASE are nested :) -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
Since CASE is a partial case (a convinience syntax entention) of ELIF then rather CASE should be removed then ELIF :) -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL,

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
then - than :) -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/16/2013 07:53 AM, Martin Schreiber wrote: MSElang probably will not support macros. While I agree that this is sensible, I vote for allowing to optionally use the standard gnu g preprocessor if the need should occur. -Michael

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/16/2013 09:56 AM, Martin Schreiber wrote: I think program semantics should be independent of line breaks. +1 -Michael -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles,

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/16/2013 02:55 PM, Ivanko B wrote: what is *=? ??? IMHO it's a good thing that fpc does support +=, -=, *= ... I think this is a very clear and handsome syntax. (Another extension I do like about fpc is case of string.) -Michael

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/17/2013 06:46 PM, Martin Schreiber wrote: Do you have a real example where elseif is much better than nested ifs I use such indentation: if a=b then begin ..x := y; .end else if c = d then begin ..z := w; .end else if f = g then begin ..s := t; end; with that an elseif keyword is not

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
think this is a very clear and handsome syntax. === as long as FPC has := which definetely misses its brothers :) case of string. === And no CASE for (strangely discriminated) float/numeric types :) And FOR .. BY step for them as well.

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/15/2013 09:40 PM, Sieghard wrote: And yet, there are - probabely still just as many - C programmers that don't trust their compilers a bit. Including myself. But my way of handling this is doing nice code and in critical cases after compiling checking the resulting ASM code it the

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
I use such indentation: === Only the cunny indentation allows to have the code be readable. It's an workaround :) as C has fall through switch cases. === Not so bad, BTW. --

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/15/2013 09:48 PM, Sieghard wrote: Not even neccessarily. It could be a programmer error, e.g. such that he forgot to declare a variable volatile, Right. This just hit me some days ago when porting a program from an ancient MRI C compiler to a modern gnu compiler. But even here, the

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/15/2013 10:17 PM, Sieghard wrote: You _do_ know that pointer errors make for most of the scurity problems of software overall, relegating any other errors to distant follow-up places? Correct but this is explicit pointer arithmetic (which in fact is very common for C programmers). For

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/18/2013 12:01 PM, Ivanko B wrote: And no CASE for (strangely discriminated) float Case of float does not make sens as with float any test on equal does not make sens. Of course it does make sense to invent a case testing ranges for float. But this would be a completely new baby.

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/18/2013 12:10 PM, Ivanko B wrote: I use such indentation: === Only the cunny indentation allows to have the code be readable. It's an workaround :) I used half-indentation with else because to me it is absolutely logical (both parts are subsumed below the if block),

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
Case of float does not make sens as with float any test on equal does not make sens. === ? These comparisions works well in IF. -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
Possible syntax for float/numeric comparisions : if f1 =n= f2 or f1 n f2 where n is digits-after-dec_point :) -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL,

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/18/2013 12:46 PM, Ivanko B wrote: Case of float does not make sens as with float any test on equal does not make sens. === ? These comparisions works well in IF. Sadly, It is allowed in if but it does not make any sense and is the cause of ample problems programming

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Martin Schreiber
On Monday 18 November 2013 10:27:34 Ivanko B wrote: strings == Not strings but chars (convertable to integer). And case doesn't allow changing/extending comprare expressions for conditions. Please try it. mostlikely does not what the inventor intended. ;-) ==

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Martin Schreiber
On Monday 18 November 2013 10:28:31 Ivanko B wrote: *are* nested === They're nested not more than branches of CASE are nested :) I disagree. Martin -- DreamFactory - Open Source REST JSON

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Martin Schreiber
On Monday 18 November 2013 11:17:42 Ivanko B wrote: Since CASE is a partial case (a convinience syntax entention) of ELIF then rather CASE should be removed then ELIF :) I disagree. Martin -- DreamFactory - Open

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
It's strange that the very convinient EL[SE]IF was in the initial PASCAL but Borland removed it for some reason in their Delphi. Martin, EL[SE]IF are HIGHLY required :) -- DreamFactory - Open Source REST JSON Services

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Martin Schreiber
On Monday 18 November 2013 15:15:14 Ivanko B wrote: It's strange that the very convinient EL[SE]IF was in the initial PASCAL but Borland removed it for some reason in their Delphi. Martin, EL[SE]IF are HIGHLY required :) None of your arguments convinced me and you did not show real code,

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
Do You request real code from PODPISKA ROZNITSA ? OK: -- procedure tmt1inputfo.findindexexec(const sender: TObject); begin with qryFindBase do begin active:= false; active:= true; if recordcount = 0 then begin may_ok:= false; showmessage('Данный

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Michael Schnell
On 11/18/2013 03:54 PM, Ivanko B wrote: if Pos (AModifiers [i], 'iI') 0 then Mask := MaskModI For me, putting then in a new line under if is extremely confusing. moreover elseif seems to be just a short form of else if (but not really that much shorter) -Michael

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Marcos Douglas
On Mon, Nov 18, 2013 at 12:18 PM, Michael Schnell mschn...@lumino.de wrote: On 11/18/2013 03:54 PM, Ivanko B wrote: if Pos (AModifiers [i], 'iI') 0 then Mask := MaskModI For me, putting then in a new line under if is extremely confusing. +1 moreover elseif seems to be just

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
a short form of else if = No. It does't deep into upper IF :) ELIF is especially good for checkin triple non-CASEable switches, in the new syntax : --- if i = 0 then writeln(0); elif i 0 then writeln('0'); else writeln('0'); end; -- And

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Martin Schreiber
On Monday 18 November 2013 17:16:03 Ivanko B wrote: Also CASE doesn't accept enumerated type. FPC and MSElang do accept enumerated types. Martin -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
looks OK for me. = Sure, since EACH elif can be casted to else if :) But how about : --- if i=0 then [..] elif i =0 [..] else [..] end; -- DreamFactory - Open Source REST

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
i 0, sure. -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Martin Schreiber
On Monday 18 November 2013 17:25:28 Ivanko B wrote: looks OK for me. = Sure, since EACH elif can be casted to else if :) But how about : --- if i=0 then [..] elif i =0 [..] else [..] end; if i = 0 then [..] else if i = 0 then

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
I do not accept your argument that elif is not nested. == IF ELIFs can be swapped since independent (not nested). ELSE IF can't since nested. You still didn't rebut my argument that there is no indention between if and end; as in case statement. === My

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
They calculate differently : ELIF is CondA || CondB || CondC || ... ELSE IF is smth like !CondA !(!CondB !(!CondC ..)). -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Ivanko B
ELSE IF is smth like !CondA !(!CondB !(!CondC ..)). = If complier isn't smart enough to sipmplify these relations (possibly to CondA || CondB || CondC || .. as the bolean logic rules) in compile time then it'll have less behefits from branch predictions etc CPU h/w

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Marcos, Du schriebst am Sun, 17 Nov 2013 19:42:57 -0200: Yes, but the paths are used only in command line to compiler -- did you see the fpc binary call? - fpc /src/synapse/* -alias synapse The paths are not in sources... that's I meant. Ok, then I didn't get you quite right about

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Martin, Du schriebst am Mon, 18 Nov 2013 09:51:02 +0100: On Monday 18 November 2013 09:22:08 Ivanko B wrote: Then use case: = It's INTEGER switch only, AFAIK. And compare expressions may differentiate - the case can't provide that In FPC and possibly in MSElang

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Ivanko, Du schriebst am Mon, 18 Nov 2013 16:51:58 +0500: Possible syntax for float/numeric comparisions : if f1 =n= f2 or f1 n f2 where n is digits-after-dec_point :) Are you trying to reinvent COBOL, badly, sadly? :-( No, a modern PC processor _doesn't_ have that much in

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Ivanko, Du schriebst am Mon, 18 Nov 2013 21:16:03 +0500: Also CASE doesn't accept enumerated type. Though there's an workaround - typecast to integer on CASEd variable and all matches. But it's so-o-o ugly. What's _that_? PROGRAM enumcase; TYPE Test = (case1, case2, case3, case4);

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Michael, Du schriebst am Mon, 18 Nov 2013 11:43:33 +0100: On 11/16/2013 09:56 AM, Martin Schreiber wrote: I think program semantics should be independent of line breaks. +1 -Michael Pascal is _built_ on this premise, it's a format free language. What MSElang will be, we don't know,

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Michael, Du schriebst am Mon, 18 Nov 2013 11:42:33 +0100: On 11/16/2013 07:53 AM, Martin Schreiber wrote: MSElang probably will not support macros. While I agree that this is sensible, I vote for allowing to optionally use the standard gnu g preprocessor if the need should occur.

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Ivanko, Du schriebst am Mon, 18 Nov 2013 21:12:14 +0500: if i = 0 then writeln(0); elif i 0 then writeln('0'); else writeln('0'); end; That's _the_ classical example for the use of the sign function CASE sign (i) OF 0: WriteLn (0); 1: WriteLn ('0'); -1:

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Michael, Du schriebst am Mon, 18 Nov 2013 12:10:13 +0100: result is as desired. If it is not, I consider some hand-optimization. (but mostly it is rather perfect.) Weel... I cannot really speak for the PC code,,, And then, there are the myriad of compilers for special systems,

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Michael, Du schriebst am Mon, 18 Nov 2013 12:22:57 +0100: arithmetic. (In fact in Object Pascal any class reference is a pointer, anyway) Yes, that's right, and has caused a lot of confusion among programmers using it. It makes the Pascal distinction between value and variable

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Sieghard
Hallo Ivanko, Du schriebst am Tue, 19 Nov 2013 01:01:32 +0500: They calculate differently : ELIF is CondA || CondB || CondC || ... ELSE IF is smth like !CondA !(!CondB !(!CondC ..)). That's nonsense. Both constructs work exactly the same, and both don't have anything in common with a

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Marcos Douglas
On Mon, Nov 18, 2013 at 6:31 PM, Sieghard s_c_...@arcor.de wrote: Hallo Marcos, ... [units] unit1=${projectdir}/level1/file1.pp unit2=${projectdir}/level1/file2.pp ... You're correct and that is exactly what I'm trying to explain! :-) So, the new ALIAS compiler parameter can be

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-18 Thread Martin Schreiber
On Monday 18 November 2013 18:48:26 Ivanko B wrote: I do not accept your argument that elif is not nested. == IF ELIFs can be swapped since independent (not nested). ELSE IF can't since nested. If one swaps elseif the program semantics can change (remember the not

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-17 Thread Ivanko B
if var1 2 then result:= true; var1:= 3; else result:= false; var1:= 5; end; = Much better :) Even better than if .. {} else {}. How about combined elif/elseif ? Me think it's highly demanded.

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-17 Thread Martin Schreiber
On Sunday 17 November 2013 18:40:49 Ivanko B wrote: if var1 2 then result:= true; var1:= 3; else result:= false; var1:= 5; end; = Much better :) Even better than if .. {} else {}. How about combined elif/elseif ? Me think it's highly demanded. Do you have a

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-17 Thread Marcos Douglas
On Sun, Nov 17, 2013 at 3:40 PM, Ivanko B ivankob4m...@gmail.com wrote: if var1 2 then result:= true; var1:= 3; else result:= false; var1:= 5; end; = Much better :) Even better than if .. {} else {}. How about combined elif/elseif ? Me think it's highly

Re: [MSEide-MSEgui-talk] MSElang, compound statements

2013-11-17 Thread Ivanko B
Nested else if starts another hierarchy level. Very inconvineient messy. Case is for integer switches currently. -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL,

  1   2   >