-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pointers concept #741
add pointers concept #741
Conversation
Rough first draft. TODO: cover use of pointers for function parameters.
Just a stub for now
Added pointers with functions
Added caveat for char *.
I haven't touched this in a while. I think it's ready for some critique. |
|
||
Variables and constants store their value in a memory location. | ||
That location in memory is known as the address of the variable or constant. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth mentioning that quite often addresses are displayed in hexadecimal format by convention?
Just a suggestion, not sure if this is needed or not.
Co-authored-by: wolf99 <[email protected]>
Co-authored-by: wolf99 <[email protected]>
Co-authored-by: wolf99 <[email protected]>
Co-authored-by: wolf99 <[email protected]>
@wolf99 , thank you very much for you exhaustive critique! I already committed almost all of your suggestions. I'll go back through it and smooth out indirection/dereferencing and backticking the types consistently. There is also the wording of the "two pointers" for me to look at, and removing the online compiler comment. And whatever else I'm not thinking of right now. It occurs to me that I didn't cover freeing pointers in this, so perhaps a small section on that should be added? |
Thanks for adding the concepts, it's great to get any contribution! On freeing pointers; Im not sure what you have in mind exactly but maybe that's more like freeing dynamically allocated memory than freeing a pointer? Although you could possibly explain something about setting pointers to NULL is the equivalent of "un-setting" a pointer, as it were; |
@wolf99 I think you're right. That's probably why I didn't add that to begin with. |
Tweaks for backticking types more consistently, regularizing the term for indirection operator, and some other minor fixes. There is a bit more left to do...
Tweaked the comments in the code example for Arrays and Pointers.
Latest commits failed "Fail with link errors". Didn't use hyperlinks in the text, so I don't know what this is referring to. |
Co-authored-by: wolf99 <[email protected]>
Co-authored-by: wolf99 <[email protected]>
A couple of recent suggested changes.
The links seem to be failing due to an unrelated link that refers to the website of the test framework that we use. |
Thanks very much! I just committed changes for the wording, and also the line breaks you suggested and then deleted. I liked the suggestion so I kept it. |
First draft of Introduction.md. Based on About.md
This looks good to me @bobahop . |
Just had a thought: what about |
I'm not very familiar with |
Hey Bob, |
Woo, thanks Bob! 🚀 |
Still very much a WIP.