String & WRITE


Closed Thread
Results 1 to 17 of 17

Thread: String & WRITE

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: String & WRITE

    When you use the HEX modifier with SEROUT, DEBUG, LCDOUT, HSEROUT, ARRAYWRITE and so on it converts FROM a numeric value TO an ASCII string representing the numeric value as hexadecimal. In other words a value of 127 becomes a "7" and a "F".

    Likewise, when you use the HEX modifier with SERIN, DEBUGIN, HSERING, ARRAYREAD etc it converts FROM an ASCII string (or single character) representing a numeric value as hexadecimal TO the actual numeric value. In other words the "7" and the "F" becomes 127.

    mpgmike does a good job of explaining how you convert ASCII to the numeric value that the "text" represents but what I'm trying to say is that you don't have to do that "manually" because the HEX- (and DEC and BIN) modifiers works both ways and does the job for you when used with a command that supports them (which DEBUGIN does).

    It would be interesting to see if any benefits (size- or speedwise) can be gained from doing the conversion "manually" instead of letting PBP handle it for you using the built in modifiers.

    Happy new year by the way!

    /Henrik.

  2. #2
    Join Date
    Dec 2017
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Re: String & WRITE

    Hello everyone,

    I am glad that my "initiative" to re-open this topic has got such an echo.
    Will give a try to presented methods and will reverd with results ASAP.

    Meanwhile have a joyful and prosperous New Year !

Similar Threads

  1. WRITE: One more PBP 2.60 Surprise ...
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 26th August 2009, 10:10
  2. Need the code to write to a memory
    By Hamlet in forum General
    Replies: 0
    Last Post: - 20th August 2007, 01:22
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27
  4. Visual Basic 6 & Access 2000
    By Demon in forum Off Topic
    Replies: 33
    Last Post: - 7th September 2006, 05:39
  5. Storing Strings using the Write command
    By BobP in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st November 2005, 12:31

Members who have read this thread : 1

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