Page 1 of 1

DataSection: Too many continuation lines for a single line.

Posted: Fri Feb 24, 2023 12:34 pm
by broozar
Hi everyone,
I am trying to store a long list of hashes (> 1000) in a DataSection like so:

Code: Select all

DataSection
  SecretHashes:
  Data.s "e92210bf29196ffd45c9f22cfbc0c999c29b8363",
         "6673d115a1dafaea51892d9d7328cd09d9919a6c",
         "34b24a46f1fc13257c7f4c7e098c294a7418b7c3",
         "f18d50bfd00aad4dc83bd8afa179b7b77a8972b5",
         ...
When I try to compile, I get this message:
"Too many continuation lines for a single line."

Due to the nature of the hashes, I cannot store them in an external file, a database or online, so I believe it has to be in a .pb file. Any suggestions how I might accomplish that? Thanks in advance, Felix

Re: DataSection: Too many continuation lines for a single line.

Posted: Fri Feb 24, 2023 12:37 pm
by Little John

Code: Select all

DataSection
  SecretHashes:
  Data.s "e92210bf29196ffd45c9f22cfbc0c999c29b8363"
  Data.s "6673d115a1dafaea51892d9d7328cd09d9919a6c"
  Data.s "34b24a46f1fc13257c7f4c7e098c294a7418b7c3"
  Data.s "f18d50bfd00aad4dc83bd8afa179b7b77a8972b5"
   ...

Re: DataSection: Too many continuation lines for a single line.

Posted: Fri Feb 24, 2023 12:47 pm
by broozar
Thanks :)

Re: DataSection: Too many continuation lines for a single line.

Posted: Fri Feb 24, 2023 1:36 pm
by mk-soft
A small tip for reading in strings from a data section. This way you can also place empty lines in a data section.

Code: Select all

;-TOP

Global NewList Hashes.s()
Global hash.s

Restore SecretHashes

Repeat
  Read.s hash
  If hash = #ETX$
    Break
  EndIf
  AddElement(Hashes())
  Hashes() = hash
ForEver

ForEach Hashes()
  Debug Hashes()
Next

DataSection
  SecretHashes:
  Data.s "e92210bf29196ffd45c9f22cfbc0c999c29b8363"
  Data.s "6673d115a1dafaea51892d9d7328cd09d9919a6c"
  Data.s "34b24a46f1fc13257c7f4c7e098c294a7418b7c3"
  Data.s "f18d50bfd00aad4dc83bd8afa179b7b77a8972b5"
  Data.s #ETX$
EndDataSection

Re: DataSection: Too many continuation lines for a single line.

Posted: Fri Feb 24, 2023 9:49 pm
by Olli
You can also prefix Data.S every ten lines...