---
title: "pos += screamnext[pos] /* does this goof up anywhere? */ — Larry Wall Quote #245 | QuotesBy.net"
description: "pos += screamnext[pos] /* does this goof up anywhere? */ — a quote by Larry Wall."
image: "https://quotesby.net/wp-content/themes/quotesby-editorial/assets/og-default.png"
---

> # pos += screamnext\[pos\] /\* does this goof up anywhere? \*/

[Larry Wall](https://quotesby.net/Larry-Wall)\#245

[Perl](https://quotesby.net/Larry-Wall/perl/)[Bugs](https://quotesby.net/Larry-Wall/bugs/)[Parsing](https://quotesby.net/Larry-Wall/parsing/)[Code comment](https://quotesby.net/Larry-Wall/code-comment/)

[WhatsApp (opens in a new tab)](https://wa.me/?text=%E2%80%9Cpos%20%2B%3D%20screamnext%5Bpos%5D%20%2F%2A%20does%20this%20goof%20up%20anywhere%3F%20%2A%2F%E2%80%9D%20%E2%80%94%20Larry%20Wall%20https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F245%2F)[X (opens in a new tab)](https://twitter.com/intent/tweet?text=%E2%80%9Cpos%20%2B%3D%20screamnext%5Bpos%5D%20%2F%2A%20does%20this%20goof%20up%20anywhere%3F%20%2A%2F%E2%80%9D%20%E2%80%94%20Larry%20Wall&url=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F245%2F)[Facebook (opens in a new tab)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F245%2F)

## About this quote

What does it mean?The code advances a position pointer using a lookup table, with a comment questioning possible errors.In plain termsIt moves forward in the string, wondering if it could break.What can you take from it?Check boundary conditions when using lookup tables for indexing.

### Where it applies

- parsing input
- processing streams

### Putting it to work

- validate indices
- add unit tests

### Questions to consider

- Where could this indexing fail?
- How to verify correctness?

### Another view

The comment admits uncertainty, indicating potential hidden bugs.

## More from Larry Wall

1. > str-&gt;str\_pok \|= SP\_FBM; /\* deep magic \*/ s = (unsigned char\*)(str-&gt;str\_ptr); /\* deeper magic \*/

[Permalink to quote \#246](https://quotesby.net/Larry-Wall/246/ "Permalink to quote 246")
2. > echo 'Hmmm...you don't have Berkeley networking in libc.a...' echo 'but the Wollongong group seems to have hacked it in.

[Permalink to quote \#248](https://quotesby.net/Larry-Wall/248/ "Permalink to quote 248")
3. > /\* And you'll never guess what the dog had \*/ /\* in its mouth... \*/

[Permalink to quote \#241](https://quotesby.net/Larry-Wall/241/ "Permalink to quote 241")

## Related quotes

1. > str-&gt;str\_pok \|= SP\_FBM; /\* deep magic \*/ s = (unsigned char\*)(str-&gt;str\_ptr); /\* deeper magic \*/

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#246](https://quotesby.net/Larry-Wall/246/ "Permalink to quote 246")
2. > /\* This bit of chicanery makes a unary function followed by a parenthesis into a function with one argument, highest precedence. \*/

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#264](https://quotesby.net/Larry-Wall/264/ "Permalink to quote 264")
3. > Beware of bugs in the above code; I have only proved it correct, not tried it.

[Donald Knuth](https://quotesby.net/Donald-Knuth)[Donald Knuth quote \#2](https://quotesby.net/Donald-Knuth/2/ "Permalink to quote 2")

```json
{
    "@context": "https://schema.org",
    "@type": "Quotation",
    "text": "pos += screamnext[pos] /* does this goof up anywhere? */",
    "url": "https://quotesby.net/Larry-Wall/245/",
    "spokenByCharacter": {
        "@type": "Person",
        "name": "Larry Wall"
    }
}
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://quotesby.net/"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Authors",
            "item": "https://quotesby.net/authors/"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Larry Wall",
            "item": "https://quotesby.net/Larry-Wall"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Quote #245",
            "item": "https://quotesby.net/Larry-Wall/245/"
        }
    ]
}
```
