Menu

Data block and table values separated by both comma and line ending?

2026-05-23
2026-05-23
  • Roger Jönsson

    Roger Jönsson - 2026-05-23

    Tools online to convert from RAW files to comma separated HEX-text etc, can sometimes format with a certain number of values per line (which sometimes makes them easier to examine and edit by hand). Making a Data block with the generated text I get " Error: Incorrectly Terminated Table Text Line" , since there is both comma and line ending for every 8, 16 or so value. For short tables it is easy to edit out, but for larger ones not so.

    I have a little program that I wrote to make to text conversion for me, but I figure that it could be a good idea if this type of online tools would work smoothly with GC basic (unless this may cause other problems).

    Hex to DEC with https://tomeko.net/online_tools/file_to_hex.php?lang=en is easy to use, just drag - drop - copy to clipboard. It outputs this if formatting "insert new lines after each 16B":
    0xFF, 0xD2, 0xC4, 0xBC, 0xB5, 0xAF, 0xAC, 0xA9, 0xA6, 0xA3, 0xA0, 0x9E, 0x9D, 0x9B, 0x9A, 0x98,
    0x97, 0x95, 0x94, 0x92, 0x91, 0x90, 0x8F, 0x8E, 0x8E, 0x8D, 0x8C, 0x8C, 0x8B, 0x8A, 0x8A, 0x89,

    Then HEX to DEC "split output into multiple lines, values per line:8":
    255, 210, 196, 188, 181, 175, 172, 169,
    166, 163, 160, 158, 157, 155, 154, 152,
    151, 149, 148, 146, 145, 144, 143, 142,
    142, 141, 140, 140, 139, 138, 138, 137

    Would there be a point in allowing comma+line ending in between bytes?
    There might be other online tools or easy to use software not combining comma and line ending that I am not aware of.

     
  • Anobium

    Anobium - 2026-05-23

    ummm.... interesting.

    You seen the recent post on how tables are handled?

    So, this is a new rule.

    Table data that ends with "," and not with a string left delimiter ( there fore part of string or string continuation shall have the comma removed.
    

    Is that the new rule ?

     
  • Roger Jönsson

    Roger Jönsson - 2026-05-23

    Just ignore if problematic, difficult or time consuming to solve. If no one ever asked for it, I bet it's not a huge deal! :)

    I just figured since the sequence that causes the problem is comma followed by an endofline, then thelogic would be if the comma, endofline sequence is found (with no data in between), then ignore either one of them. If there is a case (with data/numbers) where space followed by endofline means something special, then ofcourse not possible.

    It would be treated as this (with the trailing comma not needing to be removed manually):
    Data wave as Byte
    255, 210, 196, 188, 181, 175, 172, 169
    166, 163, 160, 158, 157, 155, 154, 152
    151, 149, 148, 146, 145, 144, 143, 142
    142, 141, 140, 140, 139, 138, 138, 137
    End Data

    or as this:

    Data wave as Byte
    255, 210, 196, 188, 181, 175, 172, 169, 166, 163, 160, 158, 157, 155, 154, 152, 151, 149, 148, 146, 145, 144, 143, 142, 142, 141, 140, 140, 139, 138, 138, 137
    End Data

    Again, if this not very easy to solve, just please ignore.

     

    Last edit: Roger Jönsson 2026-05-23
  • Roger Jönsson

    Roger Jönsson - 2026-05-23

    I'm looking for a simple way for anyone to import and edit audio samples ans export as RAW data.
    This can be done with Audacity (A free, opensource sound editor).
    Then to have a simplest, easiest way to get that RAW data it into the GC-basic program.

    The conversion can be done on the site that I linked to. -As long as it is instructed to not "insert newline", it works.
    However sometimes it is convenient to have newline/endofline after each 8 or 16 values for better readability and there is where it got problematic since both comma and newline was generated in between some data values. One does not have to do this, it would just be nice if it worked.

     
  • Anobium

    Anobium - 2026-05-23

    I will have a look.

     

Log in to post a comment.

MongoDB Logo MongoDB