Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array #1181

Closed
p5pRT opened this issue Feb 15, 2000 · 2 comments
Closed

array #1181

p5pRT opened this issue Feb 15, 2000 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 15, 2000

Migrated from rt.perl.org#2151 (status was 'resolved')

Searchable as RT2151$

@p5pRT
Copy link
Author

p5pRT commented Feb 15, 2000

From buhler@ravel.magnet.fsu.edu

[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'

@p5pRT
Copy link
Author

p5pRT commented Feb 15, 2000

From @tamias

On Tue, Feb 15, 2000 at 01​:08​:09PM -0500, Charles Buhler wrote​:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant