A. Pagaltzis wrote:
I have the following code:
class MyStupidString {
method repeatit(Str $string, Int $repeat) {
say $string xx $repeat;
my $add = $string xx $repeat;
say $add;
}
};
my $obj = MyStupidString.new;
$obj.repeatit("---",1
Fagyal Csongor skribis 2006-09-28 15:11 (+0200):
>say $string xx $repeat;
List context.
>my $add = $string xx $repeat;
Item context, for a list repetition operator. Doesn't really make sense,
and I think a warning or error message would be more appropriate.
I thi
> I have the following code:
>
> class MyStupidString {
> method repeatit(Str $string, Int $repeat) {
> say $string xx $repeat;
> my $add = $string xx $repeat;
> say $add;
> }
>
> };
>
> my $obj = MyStupidString.new;
> $obj.repeatit
Hi,
I have the following code:
class MyStupidString {
method repeatit(Str $string, Int $repeat) {
say $string xx $repeat;
my $add = $string xx $repeat;
say $add;
}
};
my $obj = MyStupidString.new;
$obj.repeatit("---",10);
Interestin