The next command, like redo and last, is used to subvert the block structure of a loop. Specifically, it causes execution immediately to skip the rest of the current iteration of the loop and continue with the next iteration (in this respect, it is like continue in C). A continue block, if one is attached to the loop, will therefore be executed.

The form next LABEL does the same, but for the loop with the LABEL.


Eratosthenes' sieve is

my @prime = (1) x $n;
for my $factor (2..sqrt($n)) {
  next unless $prime[$factor];    # ***
  for my $div (2..$n/$factor) {
    $prime[$div*$factor] = 0;
The point here is not efficiency, but a real-life use of next. The line marked "# ***" avoids running on non-prime factors; their multiples have already been eliminated.


The command NEXT {wa,i}s used to terminate a FOR loop. Thus,

10 FOR I=1 TO 100
is a good way to cheat in kindergarten.

The loop variable may be appended to the command (see above, "NEXT I"). The interpreter {c,w}ould use this to check your program (specifically, that the variable matched that of the FOR command, and that you had nested your loops correctly). BUT... If you "forgot" it (or left it out intentionally), the innermost loop would be closed. Paradoxically, this was faster on old interpreters (because they didn't need to perform the extra text, or even read the longer form from memory!). Generations of young 1970s/1980s programmers learned that correctness is the enemy of speed in this unfortunate way.

You could close multiple FOR loops by saying e.g. "NEXT K,J,I". This would close the loops indexed by the variables K,J,I, in that order:

10 FOR I=0 TO 9
20 FOR J=0 TO 9
30 FOR K=0 TO 9
Note that you still need to close the innermost loop first; "NEXT I,J,K" would fail miserably.

You could still omit the index variables from the statement. "NEXT,," would have had the same effect above (and would have been faster, to boot).

We knew we'd either be the last hardware company that made it or the first that didn't, and we were the first that didn't.

—Steve Jobs

What Was NeXT?
NeXT Computer, Inc. was the company established by Steve Jobs following his resignation from Apple in January 1986. It is well-known for its stylish black hardware, especially the 1 foot cube computer it sold. Its object oriented operating system, NeXTStep was extremely attractive with such features as Display Postscript, easy to use API kits for developers and a slick GUI interface on top of a Unix foundation.

Ironically, NeXT was bought out by Apple in 1996...the very company that had spurned Jobs nearly a decade prior. NeXTStep is now the base for macOS.

The legendary power struggle in Apple between Steve Jobs and John Sculley came to a head on April 10, 1985 when the board of executives stripped Jobs of all executive responsibilites and banished him to an office in Bandley 6--a small, near empty building on the Apple campus that was later nicked named "Siberia" due to its isolation from day-to-day operations of the company. For several months, Jobs remained at Apple as the chairman, but having no real power, he went around the nation, asking colleges about their ideal computer. It was in early September, while Jobs was having lunch with Paul Berg--Stanford University biochemist and Nobel laureate that it gave Jobs the spark to found a new startup.

Berg expressed frustration at the problems doing a "wet lab" experiment on gene splicing, Jobs suggested that he simulate the experiments on a computer. Supposedly, Berg's reaction was so enthusiastic that Jobs realized he was onto something big.

A Sour Apple
When Jobs first propsed his new company, initally called Next, Inc. (Later changed to NeXT Computer, Inc.), the Apple Board of Directors was receptive and considered investing in Jobs' new company. However, it went ballistic when Jobs announced that he was taking 5 senior Apple executives with him:

  • Susan Barnes (Senior controller for U.S. sales and marketing)
  • George Crow (Engineering manager)
  • Dan'l Lewin (Higher education marketing manager)
  • Rich Page (Apple Fellow)
  • Guy "Bud" Tribble (Manager of software engineering)

When Jobs promptly resigned, Apple sued him for dereliction of duties (hah!). The suit was dropped a short while later in January 1986 when Jobs agreed to not hire any Apple employees for 6 months, and further more, that any computer offered by his new company must be more powerful than any Apple product on the market, this was the "Non-Compete Clause."

NeXT was initially financed by $7 million of Jobs' own money, but within a year, the company began running out of money and started to look for investors. By chance, Texas millionaire Ross Perot happened to be watching a documentary that featured Steve Jobs and called him up as a potential investor. Jobs offered a 16% stake in NeXT for $20 million giving NeXT an insane value of $125 million...Perot accepted and became the company's chief investor and a board member.

From Next to NeXT
Shortly after founding NeXT, Jobs went to Yale professor Paul Rand to design his company's new logo. Rand was a legend in the graphic arts field, designing the logos for such well-known brands as ABC, UPS, and others. Interestingly, Rand was the man who convinced IBM to use its acronym instead of it's full name in the 1960s, and since Rand was still an advisor to the company, Jobs managed to convince IBM vice chairman Paul Rizzo to release Rand of his obligation.

Rand produced the now famous NeXT logo in June of 1986. He had gotten $100,000 up front before accepting the commission, and was under no obligation to create another if Jobs disliked his first product. Rand was also the creator of the bizarre spelling of NeXT--the e would stand out, and could represent, "education, excellence, expertise, exceptional, excitement, E = mc2".

October 12, 1988
Originally, Jobs had forecasted that the NeXT machine would be out by the spring of 1987. However, like his predictions about the launch date of the Macintosh...it was a dream. The NeXT was formally released to an eager press at the Louise M. Davies Symphony Hall in San Francisco. However, it would take nearly another year before the machine actually went to market--September 18, 1989 to be precise.

Although the press was in love with the machine, its target market, higher education, saw things differently. Although it came with a full array of programs including Mathematica, a reference library, and the full works of William Shakespeare, it was too expensive and loaded to be a personal computer, yet too underpowered to be a workstation, the computer was dubbed by NeXT marketing to be a "personal workstation."

With the clear signals that the NeXT was not going to succeed only in the education market, the company struck up a deal with the nation's biggest computer retail store: Businessland. With the rights to sell 100,00 machines in 3 years with no discounting. It seemed to be redux of his attitude with the Macintosh, Jobs simply didn't look at the numbers; NeXT's head of manufacturing was increasing production for 120,000 machines annually while the company was only squeaking out 400 machines a month at the educator's price of $6,500.

Things Fall Apart
The lukewarm reception the NeXT Computer System received caused the company to rethink its strategy and began to address many of the system's drawbacks--the lack of color, floppies, and hard drives, the faulty magno-optical drive, etc. And on September 18, 1990 NeXT tried again with the new NeXTstation, nicknamed the "slab" for $4,995. For $3,000 more one could go color. Also avaliable for $7,995 was the NeXTcube, housed in the original NeXT Computer System cube, with the same configuration as the NeXTstation, but with a wider range of networking capabilities and expansions. It could also add the $3,995 NeXTdimension video card.

The new products, and NeXT itself, however, were hampered by numerous events. Businessland went under in May of 1991, ending its sales contract with NeXT; the NeXTdimension's compression chip's third-party developer pulled out; in April 1991 CFO Susan Barnes resigned; Ross Perot pulled out in June 1991.

Black Tuesday
With more than 5 years of struggling sales, Jobs admitted defeat, and on Tuesday, February 10, 1993 NeXT announced that it was discontinuing its hardware production and selling it to Canon, laying off 280 of its 530 employees in the process. By this time, Jobs was the only founding member of the company left.

What NeXT had left was its object oriented operating system NeXTStep (Renamed NEXTSTEP). A year earlier, at the first NeXTWorld Expo, Jobs had announced the soon-to-be-released NEXTSTEP 3.0 for its own machines (To be released Q2 1992) and NEXTSTEP 486 (To be released September 1992) for the processor of the same name. However, not surprisingly, they were released late with NEXTSTEP 3.0 not being release until September, and NEXTSTEP 486 (Renamed NEXTSTEP for Intel Processors to reflect its ability to run on Pentium processors) in May 1993.

NeXT + Apple
With the selling of it's hardware arm, NeXT found a niche as many banks and financial corporations began using the NEXTSTEP operating system for its rapid software deployment ablities. In late 1994, NeXT reported its first annual profit, and in September 1995, that it was consistently profitable. Around the time it shipped its web development kit WebObjects in 1996 there was also an aborted attempt to take the company public, but it wouldn't matter much as Apple began snooping around, desperate to find a replacement for the aging Mac OS technology.

At first, the clear candidate was another company established by a former Apple executive, Jean-Louis Gassee's Be Inc. and their operating system, BeOS. However, Gassee played hardball a bit too much with Apple, demanding an exorbitant price, leaking information to the media (Which infuriated Apple), etc. and in the end it cost him.

On December 20, 1996 NeXT and Apple publicly announced a friendly merger. It is interesting to note that Jobs stated that he initially called Apple to warn them about buying Be. Gassee did make a last ditch proposal to Apple, but to no avail. And despite the attempts to play down Jobs as a part-time advisor to the company, history has shown a much different story.

Apple may have bought NeXT, but NeXT took over Apple

NeXT Quotes...
Write software for it? I'd piss on it! ~~ Bill Gates (In response to InfoWorld’s Peggy Watt asking if Microsoft would develop applications for the NeXT Computer)

You can have a good product with a lot of good philosophical thinking behind it—a lot of pureness—and still not sell. You gotta have some luck, too. The NeXT is a good machine that just didn’t have the luck to make it successful. ~~ Steve Wozniak

Owen W. Linzmayer. Apple Confidential.
Wikipedia. NeXT, Inc.

Next (?), a., superl. of Nigh. [AS. nhst, ni'ehst, nhst, superl. of ne�xa0;h nigh. See Nigh.]


Nearest in place; having no similar object intervening.


Her princely guest Was next her side; in order sat the rest. Dryden.

Fear followed me so hard, that I fled the next way. Bunyan.


Nearest in time; as, the next day or hour.


Adjoining in a series; immediately preceding or following in order.

None could tell whose turn should be the next. Gay.


Nearest in degree, quality, rank, right, or relation; as, the next heir was an infant.

The man is near of kin unto us, one of our next kinsmen. Ruth ii. 20.

Next is usually followed by to before an object, but to is sometimes omitted. In such cases next in considered by many grammarians as a preposition.

Next friend Law, one who represents an infant, a married woman, or any person who can not appear sui juris, in a suit at law.


© Webster 1913.

Next, adv.

In the time, place, or order nearest or immediately suceeding; as, this man follows next.


© Webster 1913.

Log in or register to write something here or to contact authors.