Determining variable length (number of digits) possible?


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: Determining variable length (number of digits) possible?

    12345 / 10 = 1234
    12345 / 100 = 123
    12345 / 1000 = 12
    12345 / 10000 = 1

    /Henrik.

  2. #2
    Join Date
    Feb 2013
    Posts
    1,150


    Did you find this post helpful? Yes | No

    Default Re: Determining variable length (number of digits) possible?

    This requires too many IFs....
    On spectrum we had X=LEFT(Y,Z)....

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,161


    Did you find this post helpful? Yes | No

    Default Re: Determining variable length (number of digits) possible?

    You are mixing string with numeric values...

    12345 is a decimal number.

    LEN or any other similar command (LEFT, RIGHT, MID) will take as an input just string characters, not numeric values.

    Ioannis

  4. #4
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Determining variable length (number of digits) possible?

    Look up DIG. It isolates single digit, as you need it, without IF...

Similar Threads

  1. Replies: 11
    Last Post: - 9th March 2020, 12:37
  2. Measuring a variable freq/length pulse and generating more pulses.
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 18th September 2014, 09:10
  3. Determining how much RAM is available?
    By Art in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th February 2012, 16:04
  4. Determining LONG compiler
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th September 2011, 19:19
  5. HSERIN for variable length string
    By Pic2008 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th February 2010, 05:58

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