Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What's the first (oldest) language that had the 'Unless' conditional/loop built into itself?

Where an example could be

unless (myVar) == if (!myVar)

until (myVar) == while (!myVar)
share|improve this question
    
Is this just in Perl & Ruby? It's not one I've come across before. –  ChrisF Apr 7 '11 at 12:39
    
I found it in Common Lisp yesterday, and I just had a discussion with a friend that lead to this question. Not sure whether it existed in MACLISP.. –  Zolomon Apr 7 '11 at 12:42
4  
That's an odd interpretation of "unless". I would have defined it as unless (myVar) == if (!myVar) and until (myVar) == while (!myVar). –  Adam Paynter Apr 7 '11 at 15:09
    
@Adam Paynter: That's what unless and until do in Ruby and Perl. I'm not quite sure which language the OP is talking about. –  Jörg W Mittag Apr 7 '11 at 17:08
    
The above example was one interpretation that I had come across - apparently there are varieties! –  Zolomon Apr 8 '11 at 6:57

3 Answers 3

up vote 8 down vote accepted

actually I've found a copy of the 1967 BCPL language manual with the UNLESS statement in it on section 6.7

http://www.fh-jena.de/~kleine/history/languages/Richards-BCPL-ReferenceManual.pdf

this was also the first language to demonstrate the "Hello World" program

BCPL became "B" at Bell Labs and then later "C"

the joke was that the real question was what would the next language be "P" from the BCPL or "D" from the Alphabetic order

share|improve this answer
1  
Great first answer, hope you stick around and write more quality content like this here. –  Jimmy Hoffa Apr 17 '13 at 17:02

The first language I ever saw with an UNLESS statement was Intercal, whose primary control structure was the COME FROM ... UNLESS ... statement. Intercal wasn't designed as a serious language, but it does date from 1972, and you can program in it (why you'd want to is another matter).

share|improve this answer

I think it originated with BASIC-PLUS on Digital systems in the '70s.

The Perl documentation mentions this heritage (run perldoc perl and look in the DESCRIPTION)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.