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

Typo in perldata #9538

Closed
p5pRT opened this issue Oct 20, 2008 · 6 comments
Closed

Typo in perldata #9538

p5pRT opened this issue Oct 20, 2008 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 20, 2008

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

Searchable as RT60022$

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 2008

From c.r.dilworth@gmail.com

Created by c.r.dilworth@gmail.com

Noticed a bit of a typo in the first example of the Subscripts section of
perldata. http​://perldoc.perl.org/perldata.html#Subscripts

  print "Element Number 2 is", $myarray[2], "\n";

Should be changed to either​:

  print "Element Number 3 is", $myarray[2], "\n";

or​:

  print "Element Number 2 is", $myarray[1], "\n";

Especially considering the first sentence after the code example :)

Perl Info

Flags:
    category=docs
    severity=low


@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2008

From daniel@crisman.org

To avoid any confusion about the equivalence (or lack there of) of
'element number', 'index', or 'array subscript' the attached patch
changes from cardinal to ordinal numbering with "The Third Element is"
which avoids any character in the string that could be used as a
subscript.

I did not find any other use of 'element number' in blead and the
ordinal style is used other locations in perldata.

dc

On Mon, Oct 20, 2008 at 12​:51​:00PM -0700, ryan dilworth wrote​:

# New Ticket Created by "ryan dilworth"
# Please include the string​: [perl #60022]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=60022 >

This is a bug report for perl from c.r.dilworth@​gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.8.

-----------------------------------------------------------------
[Please enter your report here]

Noticed a bit of a typo in the first example of the Subscripts section of
perldata. http​://perldoc.perl.org/perldata.html#Subscripts

print "Element Number 2 is", $myarray[2], "\n";

Should be changed to either​:

print "Element Number 3 is", $myarray[2], "\n";

or​:

print "Element Number 2 is", $myarray[1], "\n";

Especially considering the first sentence after the code example :)

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=docs
severity=low
---

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2008

From daniel@crisman.org

34562-blead_perldata_index.diff
--- blead/pod/perldata.pod	2008-09-19 17:04:17.000000000 -0400
+++ 34562_perldata_index/pod/perldata.pod	2008-10-23 18:08:00.000000000 -0400
@@ -674,7 +674,7 @@
 square brackets.  For example:
 
     @myarray = (5, 50, 500, 5000);
-    print "Element Number 2 is", $myarray[2], "\n";
+    print "The Third Element is", $myarray[2], "\n";
 
 The array indices start with 0. A negative subscript retrieves its 
 value from the end.  In our example, C<$myarray[-1]> would have been 

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2008

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2008

From @mhx

On 2008-10-23, at 20​:14​:56 -0400, Daniel Frederick Crisman wrote​:

To avoid any confusion about the equivalence (or lack there of) of
'element number', 'index', or 'array subscript' the attached patch
changes from cardinal to ordinal numbering with "The Third Element is"
which avoids any character in the string that could be used as a
subscript.

Thanks, applied as #34566.

Marcus

--
I have a theory that it's impossible to prove anything, but I can't prove it.

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2008

@mhx - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant