HSERIN each character cost 3 pgm words


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    That'll work!

    Might use a few bytes for those extra 0's

    You can put the "Escape codes" in the string, and it won't use the extra bytes.

    @ da "abcd\nefgh",0

    Code:
    \a	Bell (alert) character		07
    \b	Backspace character		08
    \f	Form feed character		0C
    \n	New line character		0A
    \r	Carriage return character	0D
    \t  	Horizontal tab character	09
    \v	Vertical tab character		0B
    \\	Backslash			5C
    \?	Question mark character		3F
    \'	Single quote (apostrophe)	27
    \"	Double quote character		22
    \0OO	Octal number (zero, Octal digit, Octal digit)	
    \xHH	Hexadecimal number
    Might even be able to put the "Null terminator" in there too.

    @ da "abcd\nefgh\x00"

    But I haven't tried that yet.
    <br>
    DT

  2. #2
    Join Date
    Jan 2007
    Posts
    39


    Did you find this post helpful? Yes | No

    Thumbs up xHH versus 0xHH

    Hello Darrel, thanks a this helped I didn't know, taht I could use the escape sequences like in C or Java

Similar Threads

  1. Replies: 4
    Last Post: - 15th April 2009, 01:54
  2. HSERIN and STR - character encoding
    By boban in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 13th August 2008, 17:36
  3. Hserin, 1st character always lost!
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th June 2007, 12:49
  4. Someone help me to simplify this
    By thrix in forum General
    Replies: 4
    Last Post: - 21st February 2004, 05:01
  5. Help wanted..
    By thrix in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 17th February 2004, 23:44

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