DataSection: Too many continuation lines for a single line.

Just starting out? Need help? Post your questions and find answers here.
broozar
User
User
Posts: 61
Joined: Sat May 08, 2010 11:21 pm
Location: Berlin, Germany

DataSection: Too many continuation lines for a single line.

Post 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
Little John
Addict
Addict
Posts: 4801
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

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

Post by Little John »

Code: Select all

DataSection
  SecretHashes:
  Data.s "e92210bf29196ffd45c9f22cfbc0c999c29b8363"
  Data.s "6673d115a1dafaea51892d9d7328cd09d9919a6c"
  Data.s "34b24a46f1fc13257c7f4c7e098c294a7418b7c3"
  Data.s "f18d50bfd00aad4dc83bd8afa179b7b77a8972b5"
   ...
broozar
User
User
Posts: 61
Joined: Sat May 08, 2010 11:21 pm
Location: Berlin, Germany

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

Post by broozar »

Thanks :)
User avatar
mk-soft
Always Here
Always Here
Posts: 6304
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

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

Post 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
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Olli
Addict
Addict
Posts: 1252
Joined: Wed May 27, 2020 12:26 pm

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

Post by Olli »

You can also prefix Data.S every ten lines...
Post Reply