[#600] A `File' is not a `IO'????? — clemens.hintze@...

17 messages 1999/08/10
[#602] Re: A `File' is not a `IO'????? — matz@... (Yukihiro Matsumoto) 1999/08/10

Hi,

[#679] Documentation about RD? — Clemens Hintze <c.hintze@...>

Hi,

78 messages 1999/08/17
[#680] Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

=begin

[#683] Re: Summary of discussion about RD (Re: Documenta tion about RD?) — clemens.hintze@... 1999/08/18

On 18 Aug, Toshiro Kuwabara wrote:

[#686] Re: Summary of discussion about RD (Re: Documenta tion about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#687] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — clemens.hintze@... 1999/08/18

On 18 Aug, GOTO Kentaro wrote:

[#693] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#695] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Clemens Hintze <c.hintze@...> 1999/08/18

On 19 Aug, Toshiro Kuwabara wrote:

[#697] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#703] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Clemens Hintze <c.hintze@...> 1999/08/19

On 19 Aug, Toshiro Kuwabara wrote:

[#706] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#681] Re: Summary of discussion about RD (Re: Documentation about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#682] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#684] Re: Summary of discussion about RD (Re: Documentation about RD?) — TAKAHASHI Masayoshi <maki@...> 1999/08/18

Hi Tosh and all,

[#685] Re: Summary of discussion about RD (Re: Documentation about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#689] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#694] Re: Summary of discussion about RD (Re: Documentation about RD?) — matz@... (Yukihiro Matsumoto) 1999/08/18

Hi,

[#700] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#702] Re: Summary of discussion about RD (Re: Documentation about RD?) — matz@... (Yukihiro Matsumoto) 1999/08/19

Hi,

[#704] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Clemens Hintze <c.hintze@...> 1999/08/19

On 19 Aug, Yukihiro Matsumoto wrote:

[#719] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#720] Re: Summary of discussion about RD (Re: Docum entation about RD?) — clemens.hintze@... 1999/08/20

On 20 Aug, Toshiro Kuwabara wrote:

[#721] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#722] Re: Summary of discussion about RD (Re: Docum entation about RD?) — clemens.hintze@... 1999/08/20

On 21 Aug, Toshiro Kuwabara wrote:

[#723] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#737] RD with multi charset — Minero Aoki <aamine@...>

Hi, I'm Minero Aoki. This is my first mail in this mailling list.

26 messages 1999/08/22

[ruby-talk:00772] Re: Ugly behavior using /<r1>/ .. /<r2>/ construct.

From: matz@... (Yukihiro Matsumoto)
Date: 1999-08-30 16:03:05 UTC
List: ruby-talk #772
Hi,

In message "[ruby-talk:00768] Ugly behavior using /<r1>/ .. /<r2>/ construct."
    on 99/08/30, clemens.hintze@alcatel.de <clemens.hintze@alcatel.de> writes:

|Is there any difference between these two:
|
|	(1) if /^start/ .. /^stop/; p "GOTCHA"; end
|	(2) if /^start/ ... /^stop/; p "GOTCHA"; end
|
|There seems no difference! But `...' should behave a little bit
|different than `..', shouldn't it?

It does.  Believe me.

From syntax.html:

  If range expression appears in conditional expression, it gives
  false until left hand side returns true, it stays true until right
  hand side is true.  .. acts like awk, ... acts like sed.

This behavior is inherited from Perl.  See perlop.pod

  In scalar context, ".." returns a boolean value.  The operator is
  bistable, like a flip-flop, and emulates the line-range (comma) operator
  of B<sed>, B<awk>, and various editors.  Each ".." operator maintains its
  own boolean state.  It is false as long as its left operand is false.
  Once the left operand is true, the range operator stays true until the
  right operand is true, I<AFTER> which the range operator becomes false
  again.  (It doesn't become false till the next time the range operator is
  evaluated.  It can test the right operand and become false on the same
  evaluation it became true (as in B<awk>), but it still returns true once.
  If you don't want it to test the right operand till the next evaluation
  (as in B<sed>), use three dots ("...") instead of two.)  The right
  operand is not evaluated while the operator is in the "false" state, and
  the left operand is not evaluated while the operator is in the "true"
  state.

|I would assume, that the then case would not entered for a line that
|matches `/stop/' using `...'.

Comparing current `...' behavior out of conditions, it is bit
natural.  But exclusive `...' behavior is rather new, lot newer than
sed style `...' in conditions.  So I'm hesitating to change the
behavior, mostly because of compatibility.

|Furthermore the subpattern capturing doesn't work well. Please consider
|following code:
|
|	if /^title(\s+(.*))?/ .. /^end/
|	   print "title=#$2\n";
|	end
|
|Here the variable `$2' will *never* have any other value than `nil'. I
|assume, that this is because `$_' will be matched against both regexps.
|As the second regexp doesn't match the first time the first one match,
|`$2' will be reset to `nil'.
|
|My proposal would be, that in such `..' construct, the variables `$n'
|should only be set to the captured subpattern of the *matched* regexp.
|The one that *doesn't* match, should not reset them! Only if both
|doesn't match, they should be reset to `nil'.
|
|What do you think?

Let me take time to think about it.  Suggestion, comments are welcome.

                                                        matz.

In This Thread