Re: Proposing a new if-else syntax

2002-02-28 Thread Mikhael Goikhman
On 27 Feb 2002 12:53:05 +0100, Dominik Vogt wrote: On Wed, Feb 27, 2002 at 10:58:05AM +, Mikhael Goikhman wrote: On 27 Feb 2002 07:17:12 +0100, Dominik Vogt wrote: [snip] I did not say that other commands *can* not have a return code but that they *do* not have one. My

Re: Proposing a new if-else syntax

2002-02-27 Thread Dominik Vogt
On Wed, Feb 27, 2002 at 12:43:29AM +, Mikhael Goikhman wrote: On 24 Feb 2002 01:42:09 +0100, Dominik Vogt wrote: [SNIP, see mailing list archive for more details] I've made a shot at the if-else syntax. Now, all conditional commands (and only conditional commands) have a return

Re: Proposing a new if-else syntax

2002-02-27 Thread Mikhael Goikhman
On 27 Feb 2002 07:17:12 +0100, Dominik Vogt wrote: On Wed, Feb 27, 2002 at 12:43:29AM +, Mikhael Goikhman wrote: On 24 Feb 2002 01:42:09 +0100, Dominik Vogt wrote: [SNIP, see mailing list archive for more details] I've made a shot at the if-else syntax. Now, all conditional

Re: Proposing a new if-else syntax

2002-02-27 Thread Mikhael Goikhman
On 27 Feb 2002 10:58:05 +, Mikhael Goikhman wrote: On 27 Feb 2002 07:17:12 +0100, Dominik Vogt wrote: We shouldn't mix both because it would become hard to understand for example Current (foobar) Read file returns (the rc of Read or the rc of Current?). It should

Re: Proposing a new if-else syntax

2002-02-27 Thread Dominik Vogt
On Wed, Feb 27, 2002 at 10:58:05AM +, Mikhael Goikhman wrote: On 27 Feb 2002 07:17:12 +0100, Dominik Vogt wrote: [snip] I did not say that other commands *can* not have a return code but that they *do* not have one. My intentions was to keep the return code of conditionals separate

Re: Proposing a new if-else syntax

2002-02-27 Thread Dominik Vogt
On Wed, Feb 27, 2002 at 11:40:51AM +, Mikhael Goikhman wrote: On 27 Feb 2002 10:58:05 +, Mikhael Goikhman wrote: On 27 Feb 2002 07:17:12 +0100, Dominik Vogt wrote: We shouldn't mix both because it would become hard to understand for example Current (foobar) Read

Re: Proposing a new if-else syntax

2002-02-27 Thread Mikhael Goikhman
On 27 Feb 2002 13:12:02 +0100, Dominik Vogt wrote: On Wed, Feb 27, 2002 at 11:40:51AM +, Mikhael Goikhman wrote: If you think this is a mix, yes, but it is not different from this: Current (foobar) Next (foobar2) Close For me it should return: * Current syntax:

Re: Proposing a new if-else syntax

2002-02-26 Thread Mikhael Goikhman
On 24 Feb 2002 01:42:09 +0100, Dominik Vogt wrote: [SNIP, see mailing list archive for more details] I've made a shot at the if-else syntax. Now, all conditional commands (and only conditional commands) have a return code that can be true (1), false (0) or error (-1). There are three new

Re: Proposing a new if-else syntax

2002-02-23 Thread Dominik Vogt
On Mon, Aug 06, 2001 at 12:05:51AM +, Mikhael Goikhman wrote: On 05 Aug 2001 13:34:02 +0200, Dominik Vogt wrote: How about this enhancement to conditional commands: Next (conditions) { false-action } true-action This would allow an else case in all conditional commands

Re: Proposing a new if-else syntax

2001-08-07 Thread Tim Phipps
[EMAIL PROTECTED] wrote: If you ask me, I would place a real interpreter language, tcl is fine. But this does not seem possible. This would require an absolutely new syntax. I am ready to rewrite hundreds of kilobytes of fvwm-themes configs, but I fear that some others have problems to

Re: Proposing a new if-else syntax

2001-08-07 Thread Dominik Vogt
On Tue, Aug 07, 2001 at 09:15:36AM +0100, Tim Phipps wrote: [EMAIL PROTECTED] wrote: If you ask me, I would place a real interpreter language, tcl is fine. But this does not seem possible. This would require an absolutely new syntax. I am ready to rewrite hundreds of kilobytes of

Re: Proposing a new if-else syntax

2001-08-07 Thread Tim Phipps
fvwm-workers@fvwm.org wrote: I'd be content to have a solution for these problems: 1) If a certain window exists, kill it; if not, start it. AddToFunc temp_true_list + I Prev (certain_window) Close AddToFunc temp_true + I DestroyFunc temp + I AddToFunc temp I temp_true_list AddToFunc

Re: Proposing a new if-else syntax

2001-08-06 Thread Tim Phipps
[EMAIL PROTECTED] wrote: On 05 Aug 2001 13:34:02 +0200, Dominik Vogt wrote: How about this enhancement to conditional commands: Next (conditions) { false-action } true-action This may work, but is this the best possible solution? This syntax is not very readable and having

Re: Proposing a new if-else syntax

2001-08-06 Thread Mikhael Goikhman
On 06 Aug 2001 10:01:51 +0100, Tim Phipps wrote: I think we can already do conditional code using self modifying functions: Ah yes, I forgot, I use self modifying functions in fvwm-themes to implement a state. But I would prefer functions to be used on purpose, to define an interface with

Re: Proposing a new if-else syntax

2001-08-06 Thread Dominik Vogt
On Mon, Aug 06, 2001 at 10:01:51AM +0100, Tim Phipps wrote: [EMAIL PROTECTED] wrote: On 05 Aug 2001 13:34:02 +0200, Dominik Vogt wrote: How about this enhancement to conditional commands: Next (conditions) { false-action } true-action This may work, but is this the best

Proposing a new if-else syntax

2001-08-05 Thread Mikhael Goikhman
On 05 Aug 2001 13:34:02 +0200, Dominik Vogt wrote: How about this enhancement to conditional commands: Next (conditions) { false-action } true-action This would allow an else case in all conditional commands without the need to store a return code of these commands. For example: