Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:18 01 Aug 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 : MMBASIC: Can I print a newline in the quoted part of string."

Author Message
chris
Regular Member

Joined: 24/08/2020
Location: United Kingdom
Posts: 56
Posted: 10:01pm 27 Aug 2020
Copy link to clipboard 
Print this post

Hi,

I'm wondering if I can place a carriage return in a print statement? Is there a special escape code? Or do I have to use additional print statements for each line?

I'm also wondering if when connecting CMM2 over serial, if there is a way to detect the width of the and height of the console window?

Sorry for the questions, and if the answers are somewhere in the manual - I can't seem to find the answers. This is all new to me.

Chris
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 10:16pm 27 Aug 2020
Copy link to clipboard 
Print this post

print "123" + chr$(13) + chr$(10) + "456"

Video Mode
print MM.INFO$(MODE)

MM.INFO options start on page 46 of User Manual.
.
Edited 2020-08-28 08:20 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 10:18pm 27 Aug 2020
Copy link to clipboard 
Print this post

Also

print mm.vres ,mm.hres

VK7JH
MMedit
 
Bizzie
Senior Member

Joined: 06/07/2014
Location: Australia
Posts: 192
Posted: 10:19pm 27 Aug 2020
Copy link to clipboard 
Print this post

Try this :-

Dim CRLF As string = Chr$(13)+Chr$(10)

Print "line1"

Print "line2"+CRLF

Print "line3"



Output is:-

line1
line2

line3


Is that what you want?

I personally would use separate print statements, makes it clearer.
Rob White
 
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