HSEROUT using STR modifier - length parameter as variable not working


Results 1 to 15 of 15

Threaded View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french part)
    Posts
    797

    Default HSEROUT using STR modifier - length parameter as variable not working

    Hi there,

    I'm using HSEROUT with the STR modifier and I can't find the way to set the number of characters "\n" in a variable instead.

    While this works:
    Code:
    HSEROUT [STR BalBuffer\40,26,13]
    ...this doesn't:
    Code:
    BalCount VAR BYTE
    BalCount = 40
    HSEROUT [STR BalBuffer\BalCount,26,13]
    It is to mention that it does compile without error in both cases.

    I didn't try this one, but according to some other post (from Bruce in 2005), DEBUG/DEBUGIN seem to accept a variable for the charater value.

    Is this a limitation for the STR modifier (= it has to be a number) in HSEROUT or is there a way to make it work with a variable?
    Last edited by flotulopex; - 21st February 2021 at 12:26.
    Roger

Similar Threads

  1. Determining variable length (number of digits) possible?
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 21st December 2020, 20:05
  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. hserout not working with parity
    By Pic2008 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th March 2010, 13:25
  4. HSERIN for variable length string
    By Pic2008 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th February 2010, 05:58
  5. Serin2 and STR Modifier
    By _Ian in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 22nd June 2005, 16:25

Posting Permissions

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