Shop OBEX P1 Docs P2 Docs Learn Events
Pointer DATA TYPE — Parallax Forums

Pointer DATA TYPE

kingbpkingbp Posts: 22
edited 2011-12-09 19:41 in General Discussion
Hello can anyone out there give me an example of how pointers are created in PBASIC, I know in C it would be something like this

int *ptr; is something like this possible in PBASIC?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2011-12-09 15:47
    Have you read the manual yet? It really helps in answering questions like this.
  • davejamesdavejames Posts: 4,047
    edited 2011-12-09 17:04
    kingbp wrote: »
    int *ptr; is something like this possible in PBASIC?

    Hello kingbp and welcome to the forum.

    What are you attempting to point TO?
  • kingbpkingbp Posts: 22
    edited 2011-12-09 18:54
    davejames wrote: »
    Hello kingbp and welcome to the forum.

    What are you attempting to point TO?

    I want to point to a variable
  • davejamesdavejames Posts: 4,047
    edited 2011-12-09 19:41
    The closest thing to a C-pointer would be the "alias".,,
    cat VAR Byte 'create a byte-sized variable
    tabby VAR cat 'create an alias for cat
    

    Either version of the programming manual (text or on-line) has information on how the BASIC Stamp variables are handled.

    You can download a copy from here:

    http://www.parallax.com/tabid/440/Default.aspx

    Pull down the "BASIC Stamp Syntax and Reference Manual 2.2"

    Regards,

    DJ
Sign In or Register to comment.