Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:45 13 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Line is too long (MMBasic)

Author Message
Decoy
Senior Member

Joined: 02/08/2019
Location: Denmark
Posts: 109
Posted: 02:17pm 27 Oct 2019
Copy link to clipboard 
Print this post

Hi guys

I got the "line is too long"-error...not sure how to line break.

Any advice? :)

/Decoy
 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 02:19pm 27 Oct 2019
Copy link to clipboard 
Print this post

Can we see the line that caused the problem please?
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 04:53pm 27 Oct 2019
Copy link to clipboard 
Print this post

I normally restructure the code when I'm getting up towards 80 characters.

The one that annoys me most, where a line-continuation would be most useful is array initialization.

So I'd like to put something like

Dim myArray(30)=(15,0,345,9,127, ... )

...but it won't fit on a line

I resort to something like:

Dim myArray(30)
label_myArray:
data 15,0,345,9,127, ...
data ...
restore label_myArray:for i=0 to 30:read myArray(i):next i

Some versions of BASIC have a 'line continuation' character (underscore or similar) but as far as I know, MMBasic doesn't have that.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025