According to What Wikipedia says about Structured Programming Paradigm
The following qualifies a language to be called Structured
- "Sequence"; ordered statements or subroutines executed in sequence.
- "Selection"; one or a number of statements is executed depending on the state of the program. This is usually expressed with keywords such as if..then..else..endif.
- "Iteration"; a statement or block is executed until the program reaches a certain state, or operations have been applied to every element of a collection. This is usually expressed with keywords such as while, repeat, for or do..until.
- Subroutines; callable units such as procedures, functions, methods, or subprograms are used to allow a sequence to be referred to by a single statement.
- Blocks are used to enable groups of statements to be treated as if they were one statement.
Must all of these conditions be present or some of it.
If it is some of the rules. Does that mean the unstructured BASIC code below qualifies to be called Structured because it has if/then
?
5 LET S = 0
10 MAT INPUT V
20 LET N = NUM
30 IF N = 0 THEN 99
40 FOR I = 1 TO N
45 LET S = S + V(I)
50 NEXT I
60 PRINT S/N
70 GO TO 5
99 END
If it must contain all the rule, can we say functional programming is not structured because it has no support for Iteration/looping?
and by the way, i made this flowchart to better understand programming paradigms, is it correct?
Edit After Answer.
After going through Christophe answer.
the diagram below reflect his correction
.........///////////////////////////////..................................
70 GO TO 5
all screws it over theif/then
.