Shop OBEX P1 Docs P2 Docs Learn Events
Constant from another spin file? — Parallax Forums

Constant from another spin file?

jmspaggijmspaggi Posts: 629
edited 2010-08-06 01:26 in Propeller 1
Hi,

Is there a way to refer a constant from another spin file?

Like

OBJ
  text : "tv_text_improved2"
PUB start
  text.out(text.cols)




Cols is in the CON section of tv_text. But look like it's not public. Is there a way to make it public?

Thanks,

JM

Comments

  • DavidMDavidM Posts: 630
    edited 2010-08-06 00:02
    HI jmspaggi,

    You can do this by using the # symbol followed by the constants name


    eg ( in your case)

    text#cols

    this statement says to use the constant in the object text, called cols


    regards

    Dave M
  • jmspaggijmspaggi Posts: 629
    edited 2010-08-06 01:26
    Super, thanks!

    I was going to duplicate all the constantes [noparse];)[/noparse] That will safe me some time and cut&past issues [noparse];)[/noparse]

    Jean-Marc

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Linux? There is worst, but it's more expensive.
Sign In or Register to comment.