generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Memory address

Previous Thread :: Next Thread 
Lombardo3 is not online. Lombardo3
Joined: 15 Dec 2012
Total Posts: 271
22 Dec 2012 10:40 AM
I'm kind of confused with memory address, I read that it label each byte, so to store a 32 bit number, we need 4 addresses? Then how pointers in C work?
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
22 Dec 2012 10:43 AM
8 x 4 = 32
Report Abuse
Lombardo3 is not online. Lombardo3
Joined: 15 Dec 2012
Total Posts: 271
22 Dec 2012 10:45 AM
Yeah... Still, I want to know how Pointers point to data bigger than a byte.
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
22 Dec 2012 10:46 AM
Dat grammar...
Report Abuse
Lombardo3 is not online. Lombardo3
Joined: 15 Dec 2012
Total Posts: 271
22 Dec 2012 10:47 AM
What grammar?
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
22 Dec 2012 10:49 AM
"memory address"
"that it label each byte"
"Then how pointers in C work?"

Nah, I'm just pulling your leg. We all have our spelling/grammar fail moments :3
Report Abuse
Lombardo3 is not online. Lombardo3
Joined: 15 Dec 2012
Total Posts: 271
22 Dec 2012 10:53 AM
*Goes away crying*
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
22 Dec 2012 10:53 AM
:(
I'll give you a Christmas Cookie if you come back...
Report Abuse
Lombardo3 is not online. Lombardo3
Joined: 15 Dec 2012
Total Posts: 271
22 Dec 2012 10:55 AM
Cookie :D
Report Abuse
essu8 is not online. essu8
Joined: 26 Nov 2012
Total Posts: 49
22 Dec 2012 10:55 AM
>Yeah... Still, I want to know how Pointers point to data bigger than a byte.

pointers point to the first byte of the data
Report Abuse
myrkos is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
22 Dec 2012 10:57 AM
This is done by having the pointer point to the first byte of the int/word/float/whatever.
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
22 Dec 2012 10:57 AM
*gives cookie*

essu8 is correct. They just point to the first byte.
Report Abuse
Lombardo3 is not online. Lombardo3
Joined: 15 Dec 2012
Total Posts: 271
22 Dec 2012 10:57 AM
And how do they know when the sequence is over?
Report Abuse
myrkos is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
22 Dec 2012 10:58 AM
Since C is statically typed, it knows the size of all the types at compile time.
Report Abuse
essu8 is not online. essu8
Joined: 26 Nov 2012
Total Posts: 49
22 Dec 2012 10:58 AM
the size of the data in bytes must be known
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
22 Dec 2012 10:59 AM
If I might ask, what are you making in C?
Report Abuse
Lombardo3 is not online. Lombardo3
Joined: 15 Dec 2012
Total Posts: 271
22 Dec 2012 11:00 AM
Everything is clearer now, thanks.
Report Abuse
Lombardo3 is not online. Lombardo3
Joined: 15 Dec 2012
Total Posts: 271
22 Dec 2012 11:02 AM
Nothing, I was googling about memory and found that each address holds one byte, so I asked myself "Then how does pointers point to data bigger than one byte?" and the rest is history.
Report Abuse
booing is not online. booing
Joined: 04 May 2009
Total Posts: 6594
22 Dec 2012 03:11 PM
It knows to stop reading when there is \0
Report Abuse
Flurite is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
22 Dec 2012 03:22 PM
booing, isn't that only for chars?
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
22 Dec 2012 05:26 PM
I never get a cookie :(

~Yea, you could rub some bacon on it... or... add a debounce to it!
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
23 Dec 2012 11:50 AM
@booingggg

thats only for C style strings.



and it reads something in an array like

arrayPointer + (offsetInArray * objectSize) (note: it might be that the *objectSize isnt needed in C++/C because it might do it automatically if the arrayPointer is of some type. like if its array of 32 bit ints, +1 would go 4 addresses forward or something.)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image