HOW do I use the REP c/n modifier ?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Simon Brodeur's Avatar
    Simon Brodeur Guest

    Default HOW do I use the REP c/n modifier ?

    I'm trying to send this separation to a terminal program :

    SEROUT TXRS,T2400,["------------------------",13,13]

    I want to use the REP c/n modifier, but will it save code space ? Surely, it should be a kind of loop. I'm trying something like this and it doesn't work :

    SEROUT TXRS,T2400,[REP DEC 45/24,13,13]

    I change the "-" to is decimal value and I want to repete it 24 times.

    It is surely a syntaxe error, can you help me...

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Close but no cigar...

    Try...

    [REP 45\24,13,10]

    or...

    [REP $2D\24,13,10]

    ...see the PICBasic Manual.

  3. #3
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Post

    You might want to look at the manual. I'm not 100%, but I don't think SEROUT supports that modifier. You may have to use SEROUT2. Look up SEROUT2 and try [REP -\24, 13, 13].
    ***EDIT***
    Nevermind... Mel beat me to it with a solution.
    Last edited by rhino; - 23rd September 2005 at 21:55.

Similar Threads

  1. The EXT (external) modifier.
    By Darrel Taylor in forum FAQ - Frequently Asked Questions
    Replies: 19
    Last Post: - 11th July 2010, 00:21
  2. Ds18b20 + 16f628a
    By Max Power in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 16th July 2009, 11:29
  3. Noobie could use a second set of eyes pls
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th June 2009, 00:00
  4. 12F675: DEC modifier not accepted
    By jswayze in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st September 2005, 02:39
  5. Serin2 and STR Modifier
    By _Ian in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 22nd June 2005, 16:25

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