Shop OBEX P1 Docs P2 Docs Learn Events
How do you display a variable on the TV screen — Parallax Forums

How do you display a variable on the TV screen

krazyideaskrazyideas Posts: 119
edited 2008-09-30 22:30 in Propeller 1
If I want to change a variable and then display the new value on the TV screen?

If k = 5
·· r := r - 1
·· term.str (string("· "))· How would I change this line?????

Comments

  • tpw_mantpw_man Posts: 276
    edited 2008-09-30 22:30
    You use the .dec function built into TV_Text. It is also built into many of the other output objects by Parallax and others. (TV_Text, Fullduplexserial, etc.).
    Use:
    if k == 5
      r := r - 1
      term.dec(r)
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
    tongue.gif
Sign In or Register to comment.