Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:18 29 Oct 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 Length Issue

Author Message
Askjerry
Newbie

Joined: 21/09/2025
Location: United States
Posts: 11
Posted: 10:54pm 21 Sep 2025
Copy link to clipboard 
Print this post

My workflow is to use NOTEPAD++ to write the code as it is a really good editor with search and replace etc. I Use TeraTerm to communicate with the PICO, 1us character delay, 10us line delay.

I can then save my work in NOTEPAD++ and then from TeraTerm click "File" then "Send File" and select my file... it goes in without my fumble-fingers making errors in EDIT.

The issue is that I just wrote a line of code that was 84 characters long... and when I went to save it (transfer it) to the PICO... it stopped transmitting that line at 80 characters.

It obviously failed at that point. I tried using the Visual Basic trick of the underscore...

Some long formula here that runs off_
the rest of that long formula


But that didn't work.

I tried setting TeraTerm to 100 characters... but it still dropped data after character 80.

Is there a solution or do I need to figure out how to break every line down?
This is mostly when I do lines like...
text 220,160,"    "+ FORMAT$(pin(temp)-16,"%.2f")+"C    ",CM,2,,&H00FFFF,&H000033


Thoughts? Suggestions?

For the above I can break it into multiple strings then do a A$+B$+C$+D$ kind of thing... but I was wondering if it could be avoided?

Yeah I know... first day on the forum and 3 posts. :-)
Jerry
 
NPHighview

Senior Member

Joined: 02/09/2020
Location: United States
Posts: 209
Posted: 11:03pm 21 Sep 2025
Copy link to clipboard 
Print this post

Welcome!

Here's my workflow using Notepad++:

1. Edit the program in Notepad++
2. Save it to a local working directory.
3. Copy the full pathname of the working directory onto the clipboard.
4. Open Teraterm, and select "Send File". Specify the working directory, then select the file. Select XModem from the protocols.
5. Quickly return to the session with the Pico. Press F11 to initiate reception, on the Pico, via Xmodem.
6. File transfer will succeed or fail. If fail, return to step 4. Otherwise, attempt to run the file on the Pico using F2.
7. Save the program on the Pico or SD card attached to it.
8. Once you're happy with the program on the Pico, Xmodem it back via your Teraterm session to the local working directory. If you want, upload it to Github.
Live in the Future. It's Just Starting Now!
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1646
Posted: 11:06pm 21 Sep 2025
Copy link to clipboard 
Print this post

  Askjerry said  ...
Thoughts? Suggestions?...

Hi Jerry,
I'm also using TT (an older version), but I don't have any problems with lines longer than 80 characters. I think the terminal settings (81x40) aren't relevant here.
I also don't use underscores at the end of lines, but shouldn't that be enabled as an option beforehand?
Regards
Michael

Did you use Xmodem?
Edited 2025-09-22 09:08 by twofingers
causality ≠ correlation ≠ coincidence
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6338
Posted: 11:33pm 21 Sep 2025
Copy link to clipboard 
Print this post

You need to set
OPTION CONTINUATION LINES ON
and the continuation characters are <space> followed by underscore.

The usual way to transfer the code is
In teraterm, "autosave"
then paste the code in
CRTL Z to finish

Covered in the manual under Full Screen Editor
Edited 2025-09-22 09:37 by TassyJim
VK7JH
MMedit
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3437
Posted: 11:47pm 21 Sep 2025
Copy link to clipboard 
Print this post

I use a variant of Jim's method -- copy from notepad++; in TeraTerm, F10 (for Autosave); CTRI Z when copy complete.

An alternative is to have the text "autosave" as the first line of your program, and CTRL Z at the end. Then all you need to do is copy and then paste into TeraTerm. (This is vegiPete's method.)
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Askjerry
Newbie

Joined: 21/09/2025
Location: United States
Posts: 11
Posted: 02:00am 22 Sep 2025
Copy link to clipboard 
Print this post

Ok... so this is how I am currently doing it...

https://www.youtube.com/watch?v=_ZFirdyk1TY

Ok... so you said...

copy from notepad++; in TeraTerm, F10 (for Autosave); CTRI Z when copy complete.

I tried... but it's not working... apparently you actually do additional steps...

https://youtu.be/cKJwNoCcYk0

Let me try it differently.

Yeah... that works... I got it now.

https://www.youtube.com/watch?v=WwtDy9zemKQ

Thanks folks!
Jerry
Edited 2025-09-22 12:02 by Askjerry
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1646
Posted: 08:44am 22 Sep 2025
Copy link to clipboard 
Print this post

  Askjerry said  ...
Yeah... that works... I got it now.
...

But you should also be familiar with XMODEM. It's much faster for large files. AUTOSAVE is more suitable for smaller amounts of data.
causality ≠ correlation ≠ coincidence
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3437
Posted: 01:56pm 22 Sep 2025
Copy link to clipboard 
Print this post

  Askjerry said  copy from notepad++; in TeraTerm, F10 (for Autosave); CTRI Z when copy complete.

I tried... but it's not working... apparently you actually do additional steps...


Yes, omitted Ctrl-V to paste before the Ctrl-Z.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Elijah 2
Newbie

Joined: 08/03/2025
Location: United States
Posts: 8
Posted: 05:34pm 22 Sep 2025
Copy link to clipboard 
Print this post

  TassyJim said  You need to set
OPTION CONTINUATION LINES ON
and the continuation characters are <space> followed by underscore.

Covered in the manual under Full Screen Editor


Wow this is NOT in the manual under Full Screen Editor nor anywhere else.  Thank you so much for this one!!!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4100
Posted: 06:27pm 22 Sep 2025
Copy link to clipboard 
Print this post

May be only in betas as yet; wouldn't be in the doc if so.

John
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6338
Posted: 09:24pm 22 Sep 2025
Copy link to clipboard 
Print this post

  Quote  Wow this is NOT in the manual under Full Screen Editor nor anywhere else.


It is a good idea to read the latest manuals.
V6.00.03 Page 20 (The latest version on Geoffs website)
  Quote  Long Lines
Long lines will only display the first part of the line up to the display’s right hand margin. The rest of the line
beyond the right hand margin is still there but it is not displayed and cannot be edited. If you want to edit a
very long line you can position the cursor near the right hand margin and press Enter. This will split the long
line into two and both parts can be separately edited. To rejoin the line use the Delete or Backspace key to
remove the line break that you previously entered.
Alternatively, you can enable continuation lines (OPTION CONTINUATION LINES ON) before entering the
editor. The allows you to use a space followed by and underscore character at the end of a line to indicate that
the next line is a continuation and should be concatenated in order for the program to run. The concatenation
occurs when the file is saved and when re-edited long lines are automatically split up as the file is read into the
editor. The line breaks may not be in the same place but the editor attempts to place them in sensible positions
(at the end of words etc.). There are no limits on where continuation characters are placed. For example, they
can be in the middle of a quoted string. The limit of a maximum of 255 characters in a concatenated line still
applies and the editor will not allow you to exit if a line is too long.

VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10533
Posted: 09:50pm 22 Sep 2025
Copy link to clipboard 
Print this post

And in the list of options - page 90
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2787
Posted: 10:06pm 22 Sep 2025
Copy link to clipboard 
Print this post

  Quote  Yes, omitted Ctrl-V to paste before the Ctrl-Z.
If this is in TeraTerm Alt-V for paste and Alt-C for copy. Ctrl is used for other things.

Copy to clipboard from notepad++. In TeraTerm:- F10 (for Autosave), Alt-V, Paste box appears if more than 1 line, <Enter>,  Ctrl-Z when paste complete.

Or using Xmodem.

In TeraTerm:- F11 (XMODEM RECEIVE), Mouse to File -> Transfer -> Xmodem Send, navigate to file and select file, Ok.

See manual 6.01R3, Commands, Xmodem - pp167,168
 
Elijah 2
Newbie

Joined: 08/03/2025
Location: United States
Posts: 8
Posted: 10:24pm 22 Sep 2025
Copy link to clipboard 
Print this post

I was in fact using an older manual.  Thanks so much to Peter and the community for moving this project forward like this.  I know this will make MMBasic that much more comfortable.  I really appreciate all the work that goes into this!  What a great project!!!
Edited 2025-09-23 08:27 by Elijah 2
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3437
Posted: 12:33pm 23 Sep 2025
Copy link to clipboard 
Print this post

  phil99 said  
  Quote  Yes, omitted Ctrl-V to paste before the Ctrl-Z.
If this is in TeraTerm Alt-V for paste and Alt-C for copy. Ctrl is used for other things.


Oops. Actually, in practice, I don't use either Ctrl-V (which doesn't work) or Alt-V (which does), but a right mouse click.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
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