Home
last modified time | relevance | path

Searched refs:ary (Results 1 – 25 of 74) sorted by relevance

123

/openbsd/src/gnu/usr.bin/perl/cpan/Scalar-List-Utils/t/
Dhead-tail.t10 my @ary;
15 @ary = head 1, ( 4, 5, 6 );
16 is( scalar @ary, 1 );
17 is( $ary[0], 4 );
19 @ary = head 2, ( 4, 5, 6 );
20 is( scalar @ary, 2 );
21 is( $ary[0], 4 );
22 is( $ary[1], 5 );
24 @ary = head -1, ( 4, 5, 6 );
25 is( scalar @ary, 2 );
[all …]
Ddualvar.t111 my @ary;
112 share(@ary);
113 $ary[0] = $siv;
114 $ary[1] = $snv;
115 $ary[2] = $suv;
117 ok($ary[0] == 42, 'Shared IV number preserved');
118 ok($ary[0] eq 'Fourty-Two', 'Shared string preserved');
119 ok(isdual($ary[0]), 'Is a dualvar');
120 ok($ary[1] == 3.14, 'Shared NV number preserved');
121 ok($ary[1] eq 'PI', 'Shared string preserved');
[all …]
/openbsd/src/gnu/usr.bin/perl/dist/threads-shared/t/
Ddualvar.t81 my @ary :shared = ($iv, $nv, $uv);
83 ok_iv($ary[0], $iv);
84 ok_nv($ary[1], $nv);
85 ok_uv($ary[2], $uv);
91 my @ary :shared;
92 @ary = ($iv, $nv, $uv);
94 ok_iv($ary[0], $iv);
95 ok_nv($ary[1], $nv);
96 ok_uv($ary[2], $uv);
102 my @ary :shared;
[all …]
Dclone.t95 my @ary = (qw/foo bar baz/);
96 my $ary = shared_clone(\@ary);
98 ok($test++, $ary->[1] eq 'bar', 'Cloned array');
99 $ary->[1] = 99;
100 ok($test++, $ary->[1] == 99, 'Clone mod');
101 ok($test++, $ary[1] eq 'bar', 'Original array');
104 ok($test++, $ary->[1] == 99, 'Clone mod in thread');
106 $ary[1] = 'bork';
107 $ary->[1] = 'thread';
112 ok($test++, $ary->[1] eq 'thread', 'Clone mod from thread');
[all …]
/openbsd/src/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.other/
Dcast5.C12 void f0 (ary_t const *const &ary) in f0() argument
14 static_cast <void const *> (ary); in f0()
15 static_cast <void *> (ary); // ERROR - casts away const in f0()
16 (void const *) (ary); in f0()
19 void f1 (ary_t *const &ary) in f1() argument
21 static_cast <void *> (ary); in f1()
22 static_cast <void const *> (ary); in f1()
23 (void const *) (ary); in f1()
26 void f2 (ary_t const *&ary) in f2() argument
28 static_cast <void const *> (ary); in f2()
[all …]
Dsizeof3.C12 int ary[10]; in main() local
15 if (sizeof (0,ary) != sizeof (ary)) in main()
17 if (sizeof (argc ? ary : ary1) != sizeof (ary)) in main()
Dstring2.C8 static const char ary[] = "wibble"; in main() local
11 ptr = ary; in main()
14 if (ptr != ary) in main()
Darray3.C17 const A ary[16]; variable
19 B (const A ary[]);
23 : ary(a) in B()
/openbsd/src/gnu/usr.bin/perl/t/op/
Dtiearray.t142 my @ary;
145 my $ob = tie @ary,'Implement',3,2,1;
147 is(tied(@ary), $ob);
150 is(@ary, 3);
152 is(join(':',@ary), '3:2:1');
155 @ary = (1,2,3);
158 is(join(':',@ary), '1:2:3');
161 my @thing = @ary;
165 @thing = @ary;
170 is(pop(@ary), 3);
[all …]
Dsplit.t20 @ary = split(/:b:/);
22 is(join("$_",@ary), 'aa:b:cc');
23 is($cnt, scalar(@ary));
26 my @xyz = (@ary = split(//));
28 is(join(".",@ary), "a.b.c.\n");
29 is($cnt, scalar(@ary));
32 @ary = split(/:/);
34 is(join(".",@ary), "a.b.c");
35 is($cnt, scalar(@ary));
39 @ary = split(' '," a b\tc \t d ");
[all …]
Dundef.t11 my (@ary, %ary, %hash);
29 @ary = ("1arg");
30 $a = pop(@ary);
32 $a = pop(@ary);
35 @ary = ("1arg");
36 $a = shift(@ary);
38 $a = shift(@ary);
41 $ary{'foo'} = 'hi';
42 ok defined($ary{'foo'});
43 ok !defined($ary{'bar'});
[all …]
Dutftaint.t28 for my $ary ([ascii => 'perl'], [latin1 => "\xB6"], [utf8 => "\x{100}"]) {
29 my $encode = $ary->[0];
30 my $string = $ary->[1];
32 my $taint = $arg; substr($taint, 0) = $ary->[1];
62 for my $ary ([ascii => 'perl'], [latin1 => "\xB6"], [utf8 => "\x{100}"]) {
63 my $encode = $ary->[0];
65 my $utf8 = pack('U*') . $ary->[1];
92 for my $ary ([ascii => 'perl'], [latin1 => "\xB6"]) {
93 my $encode = $ary->[0];
95 my $up = pack('U*') . $ary->[1];
[all …]
Darray.t15 @ary = (1,2,3,4,5);
16 is(join('',@ary), '12345');
18 $tmp = $ary[$#ary]; --$#ary;
21 is(join('',@ary), '1234');
218 @ary = (12,23,34,45,56);
220 is(shift(@ary), 12);
221 is(pop(@ary), 56);
222 is(push(@ary,56), 4);
223 is(unshift(@ary,12), 5);
558 @ary = ('a','b');
[all …]
Dsplit_unicode.t87 @ary = split(//, $string, 2);
89 is($cnt, scalar(@ary), "Check element count from previous test");
/openbsd/src/gnu/usr.bin/perl/h2pl/
Dcbreak.pl20 @ary = unpack($sgttyb_t,$sgttyb);
22 $ary[4] |= &CBREAK;
23 $ary[4] &= ~&ECHO;
25 $ary[4] &= ~&CBREAK;
26 $ary[4] |= &ECHO;
28 $sgttyb = pack($sgttyb_t,@ary);
Dcbreak2.pl19 @ary = unpack($sgttyb_t,$sgttyb);
21 $ary[4] |= $CBREAK;
22 $ary[4] &= ~$ECHO;
24 $ary[4] &= ~$CBREAK;
25 $ary[4] |= $ECHO;
27 $sgttyb = pack($sgttyb_t,@ary);
/openbsd/src/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.abi/
Dcxa_vec.C73 void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor); in test0() local
74 abi::__cxa_vec_delete (ary, 1, sizeof (std::size_t), dtor); in test0()
107 void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor); in test1() local
140 void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor); in test2() local
141 abi::__cxa_vec_delete (ary, 1, sizeof (std::size_t), dtor); in test2()
176 void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor); in test3() local
177 abi::__cxa_vec_delete (ary, 1, sizeof (std::size_t), dtor); in test3()
214 void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor); in test4() local
/openbsd/src/gnu/usr.bin/perl/t/re/
Dreg_posixcc.t50 my $ary= shift;
56 my $first= $ary->[0];
57 my $last= $ary->[0];
59 for my $idx (1..$#$ary) {
60 if ( $ary->[$idx] != $last + 1) {
64 $first= $last= $ary->[$idx];
67 $last= $ary->[$idx];
/openbsd/src/gnu/usr.bin/perl/t/cmd/
Dfor.t26 @ary = (1,2,3,4,5);
27 foreach $foo (@ary) {
30 if (join('',@ary) eq '246810') {print "ok 3\n";} else {print "not ok 3\n";}
32 for (@ary) {
36 print $ary[1];
/openbsd/src/gnu/usr.bin/perl/ext/Hash-Util/lib/Hash/
DUtil.pm684 my ($total, $ary, $start_idx, $title, $row_title)= @_;
691 if ( @$ary < 10) {
692 for my $idx ($start_idx .. $#$ary) {
693 $str .= $idx x sprintf("%.0f", ($ary->[$idx] * $bar_width));
700 foreach my $idx ($start_idx .. $#$ary) {
704 $ary->[$idx] / $total * 100,
705 $ary->[$idx],
706 "#" x sprintf("%.0f", ($ary->[$idx] * $bar_width)),
/openbsd/src/gnu/usr.bin/perl/
Dav.c342 SV** ary; in Perl_av_store() local
379 ary = AvARRAY(av); in Perl_av_store()
385 ary[++AvFILLp(av)] = NULL; in Perl_av_store()
391 SvREFCNT_dec(ary[key]); in Perl_av_store()
395 ary[key] = val; in Perl_av_store()
450 return &ary[key]; in Perl_av_store()
474 SV** ary; in Perl_av_make() local
478 Newx(ary,size,SV*); in Perl_av_make()
479 AvALLOC(av) = ary; in Perl_av_make()
480 AvARRAY(av) = ary; in Perl_av_make()
[all …]
Dpp.c6106 AV *ary = MUTABLE_AV(*++MARK); variable
6115 const MAGIC * const mg = SvTIED_mg((const SV *)ary, PERL_MAGIC_tied);
6118 return Perl_tied_method(aTHX_ SV_CONST(SPLICE), mark - 1, MUTABLE_SV(ary), mg,
6123 if (SvREADONLY(ary))
6131 offset += AvFILLp(ary) + 1;
6137 length += AvFILLp(ary) - offset + 1;
6143 length = AvMAX(ary) + 1; /* close enough to infinity */
6147 length = AvMAX(ary) + 1;
6149 if (offset > AvFILLp(ary) + 1) {
6152 offset = AvFILLp(ary) + 1;
[all …]
/openbsd/src/gnu/usr.bin/perl/dist/Thread-Queue/t/
D03_peek.t40 my $ary = $q->peek(-1);
41 is_deeply($ary, [ qw/foo bar/ ], 'Peek array');
/openbsd/src/gnu/usr.bin/perl/dist/Unicode-Normalize/
Dmkheader212 my @ary;
214 push @ary, ord(substr($uni,$i,1));
216 return @ary;
/openbsd/src/gnu/usr.bin/perl/t/uni/
Dgv.t284 tie my @ary => "Ʈ";
285 $ary[0] = *DATA;
286 is ($ary[0], '*main::DATA');
288 ref\tied(@ary)->[0], 'GLOB',
292 my $x = readline $ary[0];

123