Skip Menu |
Report information
Id: 2151
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: buhler [at] ravel.magnet.fsu.edu
Cc:
AdminCc:

Operating System: dec_osf
PatchStatus: (no value)
Severity: medium
Type: docs
Perl Version: 5.003
Fixed In: (no value)



Date: Tue, 15 Feb 2000 13:08:09 -0500
From: Charles Buhler <buhler [...] ravel.magnet.fsu.edu>
To: perlbug [...] perl.com
Subject: array
Cc: tcombs [...] magnet.fsu.edu
Download (untitled) / with headers
text/plain 1.2k
[Please enter your report here] for($k=1;$k<=12;$k++){ for($j=1;$j<=12;$j++){ @a[$k.$j] = $k; }} for($n=1;$n<=12;$n++){ for($m=1;$m<=12;$m++){ print "a = @a[$n.$m]\n"; }} A simple program like this over-writes the matrix element [1.11] with [11.1] but only for matrices larger than 10X10. Site configuration information for perl 5.003: Configured by richards at Wed Oct 2 15:35:05 EDT 1996. Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration: Platform: osname=dec_osf, osver=3.0, archname=alpha-dec_osf uname='osf1 chopin.magnet.fsu.edu v3.0 358 alpha ' hint=previous, useposix=true, d_sigaction=define Compiler: cc='gcc', optimize=' ', gccversion=2.6.3 cppflags='' ccflags ='' stdchar='unsigned char', d_stdstdio=define, usevfork=false voidflags=15, castflags=0, d_casti32=define, d_castneg=define intsize=4, alignbytes=8, usemymalloc=y, randbits=15 Linker and Libraries: ld='ld', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /usr/shlib /lib /usr/lib /usr/ccs/lib libs=-ldbm -ldb -lm -lc -lbsd -lPW libc=/usr/shlib/libc.so, so=so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=, ccdlflags=' ' cccdlflags='-fpic', lddlflags='-shared -expect_unresolved "*" -s -hidden -L/usr/local/lib'
Date: Tue, 15 Feb 2000 13:18:55 -0500
From: Ronald J Kimball <rjk [...] linguist.dartmouth.edu>
To: buhler [...] magnet.fsu.edu
Cc: perl5-porters [...] perl.org, tcombs [...] magnet.fsu.edu
Subject: Re: [ID 20000215.006] array
Download (untitled) / with headers
text/plain 871b
On Tue, Feb 15, 2000 at 01:08:09PM -0500, Charles Buhler wrote: Show quoted text
> > This is a bug report for perl from buhler@magnet.fsu.edu, > generated with the help of perlbug 1.13 running under perl 5.003. > > [Please enter your report here] > > for($k=1;$k<=12;$k++){ > for($j=1;$j<=12;$j++){ > @a[$k.$j] = $k; > }} > for($n=1;$n<=12;$n++){ > for($m=1;$m<=12;$m++){ > print "a = @a[$n.$m]\n"; > }} > > A simple program like this over-writes the matrix element [1.11] with > [11.1] but only for matrices larger than 10X10. >
What matrix element? Those are linear arrays, not matrices. . is the concatenation operator; '1' . '11' and '11' . '1' are of course the same. RTFM: perlop (for the concatenation operator), perldata (for arrays), perlreftut, perlref, perllol, perldsc BTW, perl5.003 is several years old. Upgrading to a more recent version is recommended. Ronald


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org