Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:53 02 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 : Stopping linefeed programatically in MMSASIC on CMM2

Author Message
Herry

Senior Member

Joined: 31/05/2014
Location: Australia
Posts: 261
Posted: 07:02am 29 Aug 2020
Copy link to clipboard 
Print this post

After the print command in a program the cursor moves down for the next line. Is there any way to keep the cursor on the word just printed, such as printing a character to emulate the up arrow. I seem to remember that in MS BASIC following the printed word with a semicolon like this worked:

PRINT "hello";
Senior?!  Whatever it says, I'm a complete and utter beginner...
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:05am 29 Aug 2020
Copy link to clipboard 
Print this post

You remember correctly
The semi-colon is your friend
CLS
PRINT "hello";
PRINT " there!"


Jim
VK7JH
MMedit
 
Herry

Senior Member

Joined: 31/05/2014
Location: Australia
Posts: 261
Posted: 07:19am 29 Aug 2020
Copy link to clipboard 
Print this post

  TassyJim said  You remember correctly
The semi-colon is your friend
CLS
PRINT "hello";
PRINT " there!"


Jim


I tried it TJ and it did not work for me!
PRINT@(100,200)"hello";
Senior?!  Whatever it says, I'm a complete and utter beginner...
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:29am 29 Aug 2020
Copy link to clipboard 
Print this post

Works for me.
CLS
PRINT@(100,200)"hello";
PRINT " there!"

VK7JH
MMedit
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 07:31am 29 Aug 2020
Copy link to clipboard 
Print this post

  Herry said  
  TassyJim said  You remember correctly
The semi-colon is your friend
CLS
PRINT "hello";
PRINT " there!"


Jim


I tried it TJ and it did not work for me!
PRINT@(100,200)"hello";


Worked for me, but you need to print another thing to see it's on the same line, did you do that?


PRINT@(100,200)"hello";

Print "same line";


I'm surprised we didn't need a space before "hello".
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2950
Posted: 07:31am 29 Aug 2020
Copy link to clipboard 
Print this post

Hi Herry,

Can you post a photo of what you get?  

I get the correct result from Jim's example?

Kind Regards

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Herry

Senior Member

Joined: 31/05/2014
Location: Australia
Posts: 261
Posted: 07:34am 29 Aug 2020
Copy link to clipboard 
Print this post

  TassyJim said  Works for me.
CLS
PRINT@(100,200)"hello";
PRINT " there!"


Maybe it's because I am using:

N$ = "hello"
print @(100,200)N$;

When I repeat that line, the cursor moves down (the screen moves up)

(Thanks for bearing with me!)
Senior?!  Whatever it says, I'm a complete and utter beginner...
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 07:35am 29 Aug 2020
Copy link to clipboard 
Print this post

Works properly as expected

CLS
PRINT @(100,100)"hello";
PRINT " there!"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:40am 29 Aug 2020
Copy link to clipboard 
Print this post

Start with just the short demo program we gave you.
There must be something else you are doing that is causing an extra PRINT statement.
VK7JH
MMedit
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2950
Posted: 07:44am 29 Aug 2020
Copy link to clipboard 
Print this post

Hi Herry,

Can you post EXACTLY the lines of code that are causing you grief, and if possible a picture of what is happening ?..

Even your simple example above looks fine on my CMM2

Kind Regards

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Herry

Senior Member

Joined: 31/05/2014
Location: Australia
Posts: 261
Posted: 07:50am 29 Aug 2020
Copy link to clipboard 
Print this post

TJ and BM

Thanks. Yes. I guessed something  else was causing it. I'll struggle on for bit first now I can be sure about the ;
Senior?!  Whatever it says, I'm a complete and utter beginner...
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 08:03am 29 Aug 2020
Copy link to clipboard 
Print this post

  Herry said  TJ and BM

Thanks. Yes. I guessed something  else was causing it. I'll struggle on for bit first now I can be sure about the ;


If you're using @(100,200) on a 200 line screen like mode 3, that could do it.
 
Herry

Senior Member

Joined: 31/05/2014
Location: Australia
Posts: 261
Posted: 07:44pm 29 Aug 2020
Copy link to clipboard 
Print this post

  capsikin said  
  Herry said  TJ and BM

Thanks. Yes. I guessed something  else was causing it. I'll struggle on for bit first now I can be sure about the ;


If you're using @(100,200) on a 200 line screen like mode 3, that could do it.


No, largest default screen setting. Found the problem. Elsewhere in the program!  Thanks to all.
Senior?!  Whatever it says, I'm a complete and utter beginner...
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5091
Posted: 06:38am 31 Aug 2020
Copy link to clipboard 
Print this post

Are you typing this from the commandline ? OR in a program.

The ";" forces the cursor to stay at that location, ready for the next print.
But if you type this command from the commandline, and type <enter> the whole screen may scroll one line (depending where you are typing).

If this is happening in a program, that will not happen, and you will get the text as described by TassyJim and matherp.

So, type "F4" (the editor), and type the 2 lines that where proposed.
Then type "F2" to run them.

Success..
PicomiteVGA PETSCII ROBOTS
 
Herry

Senior Member

Joined: 31/05/2014
Location: Australia
Posts: 261
Posted: 06:40am 31 Aug 2020
Copy link to clipboard 
Print this post

All fixed!
Senior?!  Whatever it says, I'm a complete and utter beginner...
 
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