• AVR Freaks

Hot!Pointer not initialized (correctly?)

Page: < 1234 Showing page 4 of 4
Author
1and0
Access is Denied
  • Total Posts : 9882
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/05 23:22:46 (permalink)
+4 (4)
LdB_ECM
Actually I said "No barren pointers"  and it isn't like that C compilers came out the day after the C90 specification.

What is a "barren pointer" anyway?  Google comes up with nothing!
 
 
However your response is pretty standard for a keyboard thug on this forum who contribute nothing. Now think was it really worth even posting that junk it isn't as if it was useful .. Get a life.

FYI, Mark worked on the XC8 compiler long before it was renamed as XC8. In addition to what others suggested and said, have a read of this Arrays and Pointers FAQ before you embarrassing yourself anymore.
#61
LdB_ECM
Senior Member
  • Total Posts : 149
  • Reward points : 0
  • Joined: 2019/04/16 22:01:25
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/05 23:34:18 (permalink)
0
@1and0 Not sure how pointing out to some dropkick that their post adds nothing beyond trolling is a "hissy fit".
 
I am pretty sure we have done this whole subject over. I am clear how it is supposed to work and the current implementation bug. The thread had actually reached a natural endpoint until the post decided to revive it. So we are clear for my part there is nothing left I want or need to know on this.
 
 
post edited by LdB_ECM - 2019/09/05 23:52:26
#62
LdB_ECM
Senior Member
  • Total Posts : 149
  • Reward points : 0
  • Joined: 2019/04/16 22:01:25
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/05 23:39:59 (permalink)
-1 (1)
1and0What is a "barren pointer" anyway?  Google comes up with nothing!

It isn't important and I will leave it as a small thing to ponder, it's obvious if you think about it.
 
The rest is just adding into a stupid trolling situation, I will leave it all well alone. Please refer to my statement above.
 
post edited by LdB_ECM - 2019/09/05 23:53:33
#63
dan1138
Super Member
  • Total Posts : 3261
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/06 00:12:25 (permalink)
+1 (1)
@1and0,

It would seem that LdB_ECM may be slow to accept your suggestion of an experience that would offer an expanded base of knowledge.

I do hope I am wrong in this regard.
#64
1and0
Access is Denied
  • Total Posts : 9882
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/06 06:32:45 (permalink)
0
LdB_ECM
@1and0 Not sure how pointing out to some dropkick that their post adds nothing beyond trolling is a "hissy fit".

For the record, I was not the one who said you're "throwing hissy fits".
 
dan1138
It would seem that LdB_ECM may be slow to accept your suggestion of an experience that would offer an expanded base of knowledge.

As always, feel free to use anything that I posted any way one would like (or not use them at all -- my feelings won't be hurt).
 
#65
Gort2015
Klaatu Barada Nikto
  • Total Posts : 3300
  • Reward points : 0
  • Joined: 2015/04/30 10:49:57
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/06 06:41:54 (permalink)
0
"barren pointer"
It sounds ignorant, you cannot communicate with other People with terms like that, no-one understands what the hell you are talking about.  Sounds Double Dutch to me.
 
 

MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
https://www.youtube.com/watch?v=Iu1qa8N2ID0
+ ST:Continues, "What Ships are Made for", Q's back.
#66
LdB_ECM
Senior Member
  • Total Posts : 149
  • Reward points : 0
  • Joined: 2019/04/16 22:01:25
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/06 07:30:19 (permalink)
0
If it's important to you, the term pre-dates C and so lets take a fast trip down memory lane.
 
Long before C ever existed there was a language that predated it called B that had no types
https://en.wikipedia.org/...(programming_language)
Now even I am not that old but back in 1990's a group of us were working between C and Pascal being the only two real languages around. A group of us were trying to produce a replica of the Borland compilers on the Free Pascal one survived and it's history has been recorded so this is our Free Pascal group
https://www.freepascal.org/credits.html
The History and reasonably well recorded goto early years
https://en.wikipedia.org/wiki/Free_Pascal
 
So if you look at object code we were writing at that era so lets open up my old pascal object unit .. note the copyright to me of 1996 and you will find earlier code around dating back to 1993
https://searchcode.com/codesearch/view/5169069/
 
So we were writing RTL and object code for DOS, DOS32 extender, OS2 and Win3.x and part for that was passing pointers around mostly in assembler because these were subsystem RTL stuff. So a pointer could be to data, to memory, to a driver, to a type, or it could be BARREN. I may be wrong but I believe the term came about because in B code it's pointer type was referred to as barren as opposed to the newly developed C language typed pointers or pointers to other things.
 
So you may not recognize the term and it probably isn't common in use but it is a term that is part of my programming history so out of habit I use it. I didn't think it was significant because if you thought about the term in the context I used it it is fairly obvious what it means.
#67
aschen0866
Super Member
  • Total Posts : 4505
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/06 07:39:07 (permalink)
+3 (3)
LdB_ECM
If it's important to you, the term pre-dates C and so lets take a fast trip down memory lane.
 
Long before C ever existed there was a language that predated it called B that had no types
https://en.wikipedia.org/...(programming_language)
Now even I am not that old but back in 1990's a group of us were working between C and Pascal being the only two real languages around. A group of us were trying to produce a replica of the Borland compilers on the Free Pascal one survived and it's history has been recorded so this is our Free Pascal group
https://www.freepascal.org/credits.html
The History and reasonably well recorded goto early years
https://en.wikipedia.org/wiki/Free_Pascal
 
So if you look at object code we were writing at that era so lets open up my old pascal object unit .. note the copyright to me of 1996 and you will find earlier code around dating back to 1993
https://searchcode.com/codesearch/view/5169069/
 
So we were writing RTL and object code for DOS, DOS32 extender, OS2 and Win3.x and part for that was passing pointers around mostly in assembler because these were subsystem RTL stuff. So a pointer could be to data, to memory, to a driver, to a type, or it could be BARREN. I may be wrong but I believe the term came about because in B code it's pointer type was referred to as barren as opposed to the newly developed C language typed pointers or pointers to other things.
 
So you may not recognize the term and it probably isn't common in use but it is a term that is part of my programming history so out of habit I use it. I didn't think it was significant because if you thought about the term in the context I used it it is fairly obvious what it means.


Never cease to brag about yourself. I quote your post so that you can't go back and change what you wrote. 
#68
NKurzman
A Guy on the Net
  • Total Posts : 17932
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/06 07:42:36 (permalink)
0
So a barren pointer is like a void pointer?
#69
LdB_ECM
Senior Member
  • Total Posts : 149
  • Reward points : 0
  • Joined: 2019/04/16 22:01:25
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/06 08:04:52 (permalink)
-1 (1)
There is some hair splitting in C close (but not in C++) there is a better approximation in C11+ which would probably be a uintptr_t. That gets around the size problem you would get from a void pointer that it has to cast to all the types in the C language. On windows32 and Go32 we were often thunking so the pointers are not the same size as the compiler.
 
So it's a pointer outside the language the compiler itself and RTL only knows about if that is clearer. In C++ I guess a smart pointer is sort of like that but I confess I haven't looked at what a smart pointer looks like under the hood so to speak. SO take that with a grain of salt.
 
I should add on my limited playing with the XC16 there does seem to be a bit of this with 16bit vs 24bit pointers that only the compiler and the RTL are aware of.  That is probably a more direct comparison and what do you call that pointer type on the XC16 even though it is mostly hidden? I have seen comments on it but not what you guys refer to it as, but I have seen it occasionally surfaces as a problem in the C code itself.
 
I find it amusing that I am accused of somehow rewritting history and bragging on what is an easily searchable and recorded history to impress a group of trolls on a hobbiest microcontroller forum :-)
post edited by LdB_ECM - 2019/09/06 09:05:25
#70
dan1138
Super Member
  • Total Posts : 3261
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/06 14:08:54 (permalink)
+3 (3)
LdB_ECM
There is some hair splitting in C close (but not in C++) there is a better approximation in C11+ which would probably be a uintptr_t. That gets around the size problem you would get from a void pointer that it has to cast to all the types in the C language. On windows32 and Go32 we were often thunking so the pointers are not the same size as the compiler.
 
So it's a pointer outside the language the compiler itself and RTL only knows about if that is clearer. In C++ I guess a smart pointer is sort of like that but I confess I haven't looked at what a smart pointer looks like under the hood so to speak. SO take that with a grain of salt.
 
I should add on my limited playing with the XC16 there does seem to be a bit of this with 16bit vs 24bit pointers that only the compiler and the RTL are aware of.  That is probably a more direct comparison and what do you call that pointer type on the XC16 even though it is mostly hidden? I have seen comments on it but not what you guys refer to it as, but I have seen it occasionally surfaces as a problem in the C code itself.
 
I find it amusing that I am accused of somehow rewritting history and bragging on what is an easily searchable and recorded history to impress a group of trolls on a hobbiest microcontroller forum :-)
 
post edited by LdB_ECM - 2019/09/06 09:05:25

Post #70 quoted in its entirety to preserve context when last edited.
 
Your post calls in to question the motives, experience and integrity of the forum members that have contributed content to this thread. I admit to being petty, small minded, pedantic, argumentative, know-it-all, bas*ard (never knew my birth parents). So I knows one when I sees one.
 
So far you have referenced methods of using pointers by uncommon names that Google and other search engines do not associate with programming in the C language. Also you have digressed in to obscure corners of various computer programming languages (C++, C11+, Pascal, B, etc.). Topics on this forum do tend to wander a bit but this thread has, until now, been a discussion about assigning an initial value to a pointer in the C language based on an array declaration.
 
The members on this forum have likely created and fixed more problems with pointers in the C language than you and I have had hot dinners.
 
So I say to you that your comments have besmirched those that have contributed to the content of this thread.
 
I acknowledge the experience, insight and patience the members here have shown to me and am thankful for it.
 
I say this at this time and in this place because I am no longer letting the little stuff slide.
 
p.s. Please do not pile on.
#71
Cyber
New Member
  • Total Posts : 25
  • Reward points : 0
  • Joined: 2007/07/02 10:48:55
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/08 05:33:54 (permalink)
0
Jeesh, three pages of storm since I last checked in.
 
I obviously also tried pointer-to-indexed-array, yielding the same result.
 
I would also shamelessly use: value_at_random_place_in_memory = *(++ptr).  Carry on.
#72
NorthGuy
Super Member
  • Total Posts : 5745
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/08 05:42:45 (permalink)
+1 (1)
Cyber
I would also shamelessly use: value_at_random_place_in_memory = *(++ptr).  Carry on.



I guess you want to provoke a long discussion about redundant parentheses :)
#73
andersm
Super Member
  • Total Posts : 2666
  • Reward points : 0
  • Joined: 2012/10/07 14:57:44
  • Location: 0
  • Status: offline
Re: Pointer not initialized (correctly?) 2019/09/08 07:09:10 (permalink)
+1 (1)
NorthGuyI guess you want to provoke a long discussion about redundant parentheses

Just the kind of post you'd expect from a tab-indenter.
#74
Page: < 1234 Showing page 4 of 4
Jump to:
© 2019 APG vNext Commercial Version 4.5