Shop OBEX P1 Docs P2 Docs Learn Events
Please help me out! — Parallax Forums

Please help me out!

HughHugh Posts: 362
edited 2009-10-03 20:42 in Propeller 1
Hi Guys,

Its late. I'm tired. Please help me out!

I have a Long named AnsaA, which will have a value between 1 and 60.

I want to draw a chain of hyphens on an LCD screen to represent the value of AnsaA, fifteen hyphens being the maximum. The current code:

repeat ((AnsaA*15)/60) 
  LCD.str(string("-"))



doesn't work - I assume due to a property of integer maths that means it wants to draw several hundred hyphens (which is what happens)

Have I missed something?

Post Edited By Moderator (Joshua Donelson (Parallax)) : 10/23/2009 4:55:28 AM GMT

Comments

Sign In or Register to comment.