|
||||||
| PHP Tutorials PHP Tutorials |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
This time I have decided to take a different approach in my tutorial. I have decided that I will add comments and the parts that need a lot of explaining I will post below. In this case it's the pow function in the class.
Also this is my VERY first OO script in any language so please bare with me. Here we are; calc.class.php PHP Code:
PHP Code:
PHP Code:
OK now time for the explaination of the pow function used. This code; PHP Code:
It will round anything in the parameters to two decimal places, in this case; PHP Code:
PHP Code:
PHP Code:
Anything else that you see wrong with the script or you see I explained the above code wrong please tell me. Good luck! +rep if you like please.
__________________
Starting Trig tutorial PHP | OO Calculator tutorial PHP | What inspires you? | Quadratic Expressions | Converting to Binary Last edited by John; 10-21-2008 at 11:18 PM. |
| Sponsored Links |
|
|
|
|||||
|
Thanks mate. Really glad you liked the tutorial, if you notice carefully, not in the actual script, I will be adding more features to it. You will know which ones just need to look out for which ones.
__________________
Starting Trig tutorial PHP | OO Calculator tutorial PHP | What inspires you? | Quadratic Expressions | Converting to Binary |
|
|||||
|
What is the point of this? The class never uses $opt...
PHP Code:
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
| Sponsored Links |
|
|
|
|||||
|
Thanks Amrosama. Opt is the option.
__________________
Starting Trig tutorial PHP | OO Calculator tutorial PHP | What inspires you? | Quadratic Expressions | Converting to Binary |
|
|||||
|
Thanks Xav
But you only have rep power of 20 ![]()
__________________
Starting Trig tutorial PHP | OO Calculator tutorial PHP | What inspires you? | Quadratic Expressions | Converting to Binary |