|
A PHP User - 13 Oct 2008
Thank you for this book, you are a God among men.
That said, even with several years of programming under my belt this is hard to follow, BUT that's because you need a good editor. It's far better than what I could ever do, thats for sure.
As to anyone who thinks this book is too long.... have you ever read a book? Because generally they tend to be longer than your average online blog. If this book was in print it would be just as big as any other programming book.
A PHP User - 13 Oct 2008
Thank you for this book, you are a God among men.
That said, even with several years of programming under my belt this is hard to follow, BUT that's because you need a good editor. It's far better than what I could ever do, thats for sure.
As to anyone who thinks this book is too long.... have you ever read a book? Because generally they tend to be longer than your average online blog. If this book was in print it would be just as big as any other programming book.
A PHP User - 13 Oct 2008
totally new to programming but want to learn php badly. you had me going until this page in the book and my brain froze. but all and all i'll be back to learn more
A PHP User - 13 Oct 2008
if you don't understand this page like most people including me. The best thing to do is bookmark and come back later. Things have always clarified that way for me so far.
A PHP User - 13 Oct 2008
http://www.usphp.com/about.prototypes.html
A PHP User - 13 Oct 2008
http://www.usphp.com/about.prototypes.html
A PHP User - 13 Oct 2008
http://www.usphp.com/about.prototypes.html
kewlceo - 13 Oct 2008
Yes, it is a function to convert case, but Paul is illustrating the prototype, or template, if you will.
string strtoupper ( string string ) // the template
means that strtoupper takes a string named "string" and returns the result to "string", thus the actual syntax:
$str = strtoupper($str);
A PHP User - 13 Oct 2008
"What that means is that the function takes one string and returns a string." --> Actually function takes lower case and upper case letters string and change them all to upper case letters string.
So far this book is great!
A PHP User - 13 Oct 2008
"What that means is that the function takes one string and returns a string." --> Actually function takes lower case and upper case letters string and change them all to upper case letters string.
So far this book is great!
A PHP User - 13 Oct 2008
i'm lost...
A PHP User - 13 Oct 2008
Whats the best way to approach programming so you can learn?
This is the second time I've read this. I must be phick.
Indo - 13 Oct 2008
"this page does seem to be a little early in the book...
simple protptypes are OK but optionalk arguments are a bit much for beginners...
otherwise this book seems to be an excellent book on the language."
I don't think so. I only have messed with Unix and Linux for a few years. I learned Basic back in the 5th grade, beyond that I don't have any programming experiance. But this page was pretty easy.
Dominic Son - 13 Oct 2008
This page does look complicated to any beginner (including myself), but i suspect mr hubzilla is just demonstrating how complicated a function can look, and how you would read it, not so much concerned with what all this stuff does so far.
If your head hurts, don't trip, just focus on the examples in the dotted line, and ask yourself 'how would php read this function? and that's where hubber explains how - as the title suggests..
zephproj@yahoo.com - 13 Oct 2008
Negative comment: So far, I find this book to be great but not quite on this section.
Positive comment: This tutorial is still the best tutorial I have ever encountered. This tutorial has drawbacks and so with other tutorials, no tutorial is perfect.
More comments: I consider individuals/institutions who offers free resources on the internet as "Heroes of the Internet", may they multiply.
zephproj@yahoo.com - 13 Oct 2008
Negative comment: So far, I find this book to be great but not quite on this section.
Positive comment: This tutorial is still the best tutorial I have ever encountered. This tutorial has drawbacks and so with other tutorials, no tutorial is perfect.
More comments: I consider individuals/institutions who offers free resources on the internet as "Heroes of the Internet", may they multiply.
A PHP User - 13 Oct 2008
this page does seem to be a little early in the book...
simple protptypes are OK but optionalk arguments are a bit much for beginners...
otherwise this book seems to be an excellent book on the language.
TxtEdMacs - 13 Oct 2008
"Why (snip)
not written as:
resource mysql_connect ( [string server], [string username], [string password] ,[bool new_link], [int client_flags])"
If you do not include the form: ...[, ... it is not a condition inclusion. The form above means all those parameters should be included. Moreover, what role does the [...], [...], [...], play? None that I can see, since the square brackets indicat nothing in such a snytax.
A PHP User - 13 Oct 2008
A PHP User wrote:
"Why is:
resource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]])
not written as:
resource mysql_connect ( [string server], [string username], [string password] ,[bool new_link], [int client_flags])"
The reason it is written this way is one of the restrains of optional parameters in C syntax languages. If you want to include an optional argument, you must include all the arguments before it.
Let's say for instance that the default server is "myServer", the default username is "admin", and the default password is "1234". If I wanted to give a different password, I couldn't just call mysql_connect("4567") because the function would think I was passing the first argument (server), mysql_connect(,,"4567") wouldn't work either. You would have to call the function with mysql_connect("myServer", "admin", "4567") even though the first two arguments are the defaults.
The nested brackets are a reminder that you have to include all the preceding paramaters. It is ugly to look at, but there is a method to the madness
rolo@irolo.net
Shadow - 13 Oct 2008
If you are using functions within a beginners book...Then you are really defeating the purpose...Because noobs are soupposed to learn...But it might be a little hard for them to understand..Since you haven't explained how they work..
Another PHP User - 13 Oct 2008
My head hurts too!!!
I reckon this page may need a re-write, its too complicated/technical. The use of the functions from the manual was confusing rather than helpful because they contained stuff we havnt seen yet which just threw me.
Also being at the start of the chapter, this page really puts you of reading any further!
Thanks for a great book though, its been really helpful so far :)
A PHP User - 13 Oct 2008
my head hurts.
A PHP User - 13 Oct 2008
Why is:
resource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]])
not written as:
resource mysql_connect ( [string server], [string username], [string password] ,[bool new_link], [int client_flags])
A PHP User - 13 Oct 2008
"However, you need not understand how function prototypes work in order to read this book - all the functions used are explained textually, with the prototypes presented merely for convenience.
As they are used for each function shown in this book, it is important you understand them before proceeding."
These sentences directly follow each other above but seem to contradict!
A PHP User - 13 Oct 2008
Good stuff
Add comment
Please note that by posting a comment here you are committing it to the public domain. This is important so that others can make use of your code themselves, and also so that I can incorporate helpful notes directly into the main text. Comments are limited to 2000 characters in length.
If you are reporting an error in the content, please tell me directly.
|