Abstraction (computer science): Difference between revisions

Content deleted Content added
m Control abstraction: Spelling/grammar/punctuation/typographical correction
rv misleading example; decomposing multiplication into additions is very inefficient
Line 73:
 
# it forces the programmer to constantly repeat fairly common tasks every time a similar operation is needed
# it forces the programmer to program for the particular hardware and instruction set, like this [[assembly language]] pseudocode below:
 
<syntaxhighlight lang="asm">
MOV 1,EAX
MOV 2,EBX
MOV (ADD EAX,EBX), EAX
MOV 0,EBX
;; do it 5 times
MOV (ADD EAX,EBX),EBX
MOV (ADD EAX,EBX),EBX
MOV (ADD EAX,EBX),EBX
MOV (ADD EAX,EBX),EBX
MOV (ADD EAX,EBX),EBX
;; In fact, assigning is harder to do than this.
ASSIGN EBX,a
</syntaxhighlight>
===Structured programming===
{{Main|Structured programming}}