Bookmark Manager - Line Too Long

Discussions about the Liberty BASIC language, with particular reference to LB Booster
RNBW
Posts: 65
Joined: Thu Apr 05, 2018 9:21 pm

Bookmark Manager - Line Too Long

Post by RNBW »

I found a program "BookmarkManager.bas" in the Just Basic Archives. Currently it only deals with Just Basic and Liberty Basic and I thought about extending it to incorporate the Just Basic Archives (where I have found one or two useful programs) and LBB.

It runs fine in JB and LB but comes up with a "Line too long" error in LBB.

The offending line is:

Code: Select all

    data "General Board", "Announcements", "Members' Lounge", "JB Programming Discussions", "Novice",_
        "Games and Graphics", "Programming Challenges", "JB Programs Shared", "Tips", _
        "The Just BASIC Environment", "Bug Reports", "Distributing your Just BASIC applications", _
        "Articles & Tutorials", "Newsletter and Wiki Discussion"
I was surprised to find this. What is the limitation on line length in LBB?
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: Bookmark Manager - Line Too Long

Post by guest »

RNBW wrote: Tue Mar 30, 2021 10:04 amI was surprised to find this. What is the limitation on line length in LBB?
The same as it is in BBC BASIC (251 tokenized bytes), since LBB works by translating the Liberty BASIC code to BBC BASIC code! The translator will try to split lines that exceed that limit into multiple, shorter, lines, but that isn't always possible. DATA statements are a case in point: they cannot be split so a DATA statement that is longer than 251 bytes after tokenization will result in a 'Line too long' error.

Item 13 in the Compatibility section of the Help file specifically mentions this: "The maximum length of a DATA statement is approximately 250 characters".
RNBW
Posts: 65
Joined: Thu Apr 05, 2018 9:21 pm

Re: Bookmark Manager - Line Too Long

Post by RNBW »

Thank you Richard

I'll have to see if I can find a way around it.

Ray