SOLVED - How to identify specific TENTHS and UNITS of a DEC number


+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154

    Question SOLVED - How to identify specific TENTHS and UNITS of a DEC number

    I have a variable with a range from 000 to 990.

    How can I identify specific numbers like:

    x20
    x45
    x70
    x95

    x can be from 0 to 9


    I don't see a quick and simple way of doing this.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: How to identify specific TENTHS and UNITS of a DEC number

    SOLVED: Confirmed
    Code:
    COM_KHz_Remainder = COM_KHz_Counter // 100
    (it's been a while since I've coded and it shows - obvious things don't jump out at me any more )

    I think Melanie is showing me the way:

    https://www.picbasic.co.uk/forum/sho...=9768#post9768

    divide by 100
    keep the remainder


    My mind is mush, I have to test it to be sure.
    Last edited by Demon; - 25th August 2024 at 04:38.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. LCDout $FE,2, dec Days - What is dec ?
    By merc07 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th June 2009, 04:03
  2. pulsein question (units of measure?)
    By nomad in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th October 2007, 00:59
  3. dec number to show on lcd (maths)
    By savnik in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th August 2007, 19:18
  4. Communications between 2 or more units.
    By nizze in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th October 2005, 15:20
  5. PWM _ Duty Cycle in Tenths
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 17th May 2004, 12:09

Members who have read this thread : 8

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts