LB Booster
« "Line too long" error »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:35am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: "Line too long" error  (Read 748 times)
Phineas Freak
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 18
xx "Line too long" error
« Thread started on: Sep 12th, 2013, 9:14pm »

I tried to compile a program that contains the following DATA structure:

Code:
  data "1",        "2",        "4",        "8",
       "10",       "20",       "40",       "80",
       "100",      "200",      "400",      "800",
       "1000",     "2000",     "4000",     "8000",
       "10000",    "20000",    "40000",    "80000",
       "100000",   "200000",   "400000",   "800000",
       "1000000",  "2000000",  "4000000",  "8000000",
       "10000000", "20000000", "40000000", "80000000",
       "0" 


And when compiler reached that line, it stopped with a "Line too long" error.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: "Line too long" error
« Reply #1 on: Sep 12th, 2013, 10:36pm »

on Sep 12th, 2013, 9:14pm, PreciseTiming wrote:
And when compiler reached that line, it stopped with a "Line too long" error.

Not at all surprising - the message means exactly what it says! There is no benefit in trying to put a large number of items into a single DATA statement; change it to use multiple DATA statements as follows:

Code:
data  "1",        "2",        "4",        "8"
data  "10",       "20",       "40",       "80"
data  "100",      "200",      "400",      "800"
data  "1000",     "2000",     "4000",     "8000"
data  "10000",    "20000",    "40000",    "80000"
data  "100000",   "200000",   "400000",   "800000"
data  "1000000",  "2000000",  "4000000",  "8000000"
data  "10000000", "20000000", "40000000", "80000000"
data  "0" 

Both LB and LBB will be happy with that.

Richard.
User IP Logged

Phineas Freak
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 18
xx Re: "Line too long" error
« Reply #2 on: Sep 13th, 2013, 11:55am »

Well, should i dare to say that i didn't think about breaking it in multiple lines...? tongue

Liberty BASIC didn't complain about it so i though it might be a general incompatibility about long lines, not only for this particular case. Although that there are always workarounds...
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: "Line too long" error
« Reply #3 on: Sep 13th, 2013, 1:31pm »

on Sep 13th, 2013, 11:55am, PreciseTiming wrote:
i though it might be a general incompatibility about long lines

It's not a general incompatibility; LBB should very rarely complain about over-long lines.

The underscore line-continuation character is valuable when declaring a menu or a structure, when it's handy to be able to put each item on a separate line. It can also be useful when assigning a long string constant, such as help text. But I'm not a great believer in using long lines when it doesn't benefit program clarity.

Richard.
User IP Logged

Phineas Freak
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 18
xx Re: "Line too long" error
« Reply #4 on: Sep 14th, 2013, 07:36am »

I should be more careful next time that i will use the line continuation...
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls