🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.borland-delphi
5 messages
5 total messages Started by Nige Tue, 06 Dec 2005 23:38
Help a newbie
#897
Author: Nige
Date: Tue, 06 Dec 2005 23:38
9 lines
1452 bytes
Looking at some sample code.

I have a line, which calls a function

and the 3rd parameter is  @Cells^[0]

whats do the @ and the ^ and the [0] indicate.

thanks
Re: Help a newbie
#898
Author: Nicholas Sherlock
Date: Tue, 06 Dec 2005 23:55
10 lines
1554 bytes
Nige wrote:
> @Cells^[0]
> 
> whats do the @ and the ^ and the [0] indicate.

The whole thing gives you the address of (@) the fist item ([0]) of the 
memory that cells uses (^). Read some tutorials on pointers.

Cheers,
Nicholas Sherlock
Re: Help a newbie
#899
Author: Jamie
Date: Wed, 07 Dec 2005 04:06
37 lines
2450 bytes
Nige wrote:
> Looking at some sample code.
> 
> I have a line, which calls a function
> 
> and the 3rd parameter is  @Cells^[0]
> 
> whats do the @ and the ^ and the [0] indicate.
> 
> thanks
> 
> 
  The @ generates an address of an item.
  so lets break this down.

  Cells is being treated like a pointer and
thus the use of ^ meaning that you are
fetching data via the pointer which is like
a road map giving directions of where the
start of the data which makes up the object
"CELLS" resides in.
    Since it's obvious that Cells must not
be a pointer already to start with, using the
@ infront will generate a pointer address of that
object.
    and the use of the [0] is like any other
array from that point on.
  it will simply use the Pointer address as the
starting base with the an offset of what
ever in the [?] to calculate the distant to
move from the start of the pointer.



-- 
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Re: Help a newbie
#900
Author: Bruce Roberts
Date: Wed, 07 Dec 2005 15:13
14 lines
1843 bytes
"Nige" <nkarnold@blueyonder.co.uk> wrote in message 
news:Ihplf.160032$Es4.143191@fe2.news.blueyonder.co.uk...
> Looking at some sample code.
>
> I have a line, which calls a function
>
> and the 3rd parameter is  @Cells^[0]
>
> whats do the @ and the ^ and the [0] indicate.

The code won't compile. In any case it is nonsensical. @Cells and Cells 
mean the same thing as does Cells^ and Cells, presuming Cells is the name 
of an array.
Re: Help a newbie
#901
Author: DrChaos
Date: Thu, 15 Dec 2005 17:09
15 lines
1734 bytes
Nige wrote:
> Looking at some sample code.
> 
> I have a line, which calls a function
> 
> and the 3rd parameter is  @Cells^[0]
> 
> whats do the @ and the ^ and the [0] indicate.
> 
> thanks
> 
> 
@ = adress of
^ dereferences a pointer
[x] is the x'th position in a list or array.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads