News:

  • August 13, 2026, 03:39:59 AM

Login with username, password and session length

Author Topic: STRPRINT ASCII control characters  (Read 5945 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
STRPRINT ASCII control characters
« on: November 17, 2022, 10:10:19 AM »
Is there a way to format the STRPRINT to print in "Quoted" view like the DataView option? I'd like to dump a serial stream to FILELOG, but would like the ASCII characters printed as "$0D$0Aabcdefg" for example.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: STRPRINT ASCII control characters
« Reply #1 on: November 17, 2022, 11:01:04 AM »
Sorry, no.

There are text editors that support displaying "binary" data in addition to ASCII form.

You could write a subroutine to do it and dump it to a UNSIGNED BYTE, then do a write that back to a different STRING using STRPUTB