Shop OBEX P1 Docs P2 Docs Learn Events
Serstring — Parallax Forums

Serstring

NewzedNewzed Posts: 2,503
edited 2005-11-02 19:36 in BASIC Stamp
I have an array:

ser VAR byte(8)

I tried to declare

Tag1 var ser(0)

but that didn't work.· How do I declare tag1 = ser(0) without using additional RAM bytes.

Sid

Comments

  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-11-02 19:33
    Sid, use implicit arrays. Much more flexible...

    tag0 VAR byte
    ser VAR tag0 ' alias name
    tag1 VAR byte
    tag2 VAR byte
    tag3 VAR byte
    tag4 VAR byte
    tag5 VAR byte
    tag6 VAR byte
    tag7 VAR byte

    Now you can refer to ser() as if you had defined the array explicitly.
    ser(0) is the same as tag0
    ser(7) is the same as tag7
    and so on.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • NewzedNewzed Posts: 2,503
    edited 2005-11-02 19:36
    What a helpful chap you are !!

    Sid
Sign In or Register to comment.