On 06 Aug 2001 00:05:51 +0000, Mikhael Goikhman wrote: > > Here is my revised proposal that solves all problems described above. > > There are 2 constructs, one is long and one is short, both may be mixed: > > if Next (conditions) { > then-commands, one per line > } > else { > else-commands, one per line > } > > if Next (conditions) then-command > else else-command > > Other one-or-zero-window commands may be used instead of "Next" as well: > "Prev", "Current" and "None". The default if not specified is "Current". > > The rules are similar to C, "else" belongs to the last "if", braces may > be used to change this. "else" part is optional. Indentation is optional. > The "{" may only appear in "if" or "else" line, "}" should be on its own. > The syntax seems to be unambiguous, but a more formal proof is needed.
I realize that starting with the long form would be a bit revolutionary. But the short form is a reasonably better alternative to the optional { else } argument in all Condition commands. So the construct looks like this (only the first line is mandatory): if Condition1 (param1) Command1 elsif Condition2 (param2) Command2 else Command3 The words if-elsif-else are taken from perl. Nested if-else commands are not allowed in the short form, i.e. more than one command "if", "else" or "elsif" on the same line is forbidden. This has a potential for a future extension in two directions: 1) more Condition commands may be added, and not only the ones dealing with windows 2) command blocks using commands "{" and "}" may be added in the future What do you think? Regards, Mikhael. -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]