The answer would, by definition, be the first programming language.
A little bit of free CS101 here...
All algorithms can be expressed using 3 elements: sequence, selection, and iteration. Those are the basic building-blocks of a computer program. In order to express an algorithm with a programming language, it has to support those 3 elements in some form. An "if" check is of course a kind of selection.
Sequence, Selection, and Iteration are the basic elements that we use
to tell the computer what to do. The code will definitely look
different depending on the programming language we use, but the
algorithm will be the same.
So let’s describe these elements:
- Sequence– the order we want the
computer to execute the instructions we provide as programmers. For
example, do this first, then do this, then do that, and so forth.
- Selection– selecting which path of an algorithm to execute depending
on some criteria. For example, if you passed a class in school, then
we execute the operations that clap and cheer and play a song. But if
you didn’t pass the class, then maybe we would say, “Better luck next
time, hang in there!”
- Iteration– looping or repeating. Many times, we
want to be able to repeat a set of operations a specific number of
times or until some condition occurs.
To get down deeper into computability theory, we call the ability of a model to express any algorithm Turing completeness, and selection is required for this. Most CS types will tell you than anything that isn't Turing complete isn't really a programming language.
So by definition every programming language has some means of selection, and always has. Without that, you don't really have a programming language.
IF (value) 10, 20, 30which would branch to statement with label
20if zero, and
IF <cond> GOTO $n? Because most languages, like BASIC and the Fortran@BobDalgleish mentioned uses constant GOTO destinations, so
IF (value) [GOTO] 10, [ELSE IF value==0 GOTO] 20, [ELSE GOTO] 30. The answer to your question depends on how exactly you define your question. Computed gotos are later and are frowned upon. for one thing they make debugging (/static analysis) a pain.
GOTO Nprobably compiles as an instruction containing the address of line N, not the value N. You generally cannot write
N = 50; GOTO 2 * Nand expect execution to continue at line 100.