'DIG' equivalent in other Languages?


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    DIG just divides the number by 10 and returns the remainder.

    Example. Say you want to extract digits 0, 1, and 2 from 102.

    102/10 = 10.2 <-- DIG 0 = 2
    10/10 = 1.0 <-- DIG 1 = 0
    1/10 = 0.1 <-- DIG 2 = 1

    Pretty simple stuff to do with any language.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    hehe..
    It wasn't easy for pic basic to do it in asm

    but you are right, and I was making it a bigger problem than it is
    I think the language I'm using can have decimal numbers placed in variables.
    Art.
    Last edited by Art; - 28th November 2005 at 00:43.

Similar Threads

  1. NMEA CheckSum Routine
    By Tom Gonser in forum Code Examples
    Replies: 2
    Last Post: - 6th June 2015, 23:24
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 23:03
  3. DIG DEC Madness
    By earltyso in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th June 2008, 00:05
  4. Rc int on 16f874
    By hakan in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 15th July 2007, 19:57
  5. LCDout Command causes Interrupt!!??
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 31st March 2005, 05:18

Members who have read this thread : 0

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