Inline Temp
From CSSEMediaWiki
(Difference between revisions)
Line 1: | Line 1: | ||
+ | ---- | ||
+ | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
+ | ---- | ||
+ | =[http://awuhodynaro.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]= | ||
+ | ---- | ||
+ | =[http://awuhodynaro.co.cc CLICK HERE]= | ||
+ | ---- | ||
+ | </div> | ||
Basically inline temp is removing variables that have been created to store a value returned from a query and replacing it with the actual query. | Basically inline temp is removing variables that have been created to store a value returned from a query and replacing it with the actual query. | ||
This leads to much clearer code (arguable) and less code. | This leads to much clearer code (arguable) and less code. | ||
Line 4: | Line 12: | ||
boolean payTax(int payRate) { | boolean payTax(int payRate) { | ||
int wages = payRate * hoursWorked; | int wages = payRate * hoursWorked; | ||
− | return wages | + | return wages >100; |
} | } | ||
Line 10: | Line 18: | ||
boolean payTax(int payRate) { | boolean payTax(int payRate) { | ||
− | return (payRate * hoursWorked) | + | return (payRate * hoursWorked) >100; |
} | } | ||
This is the opposite of [[Introduce Explaining Variable]]. | This is the opposite of [[Introduce Explaining Variable]]. |
Revision as of 10:45, 24 November 2010
Basically inline temp is removing variables that have been created to store a value returned from a query and replacing it with the actual query. This leads to much clearer code (arguable) and less code.
boolean payTax(int payRate) { int wages = payRate * hoursWorked; return wages >100; }
Using inline temp
boolean payTax(int payRate) { return (payRate * hoursWorked) >100; }
This is the opposite of Introduce Explaining Variable.