Stopping linefeed programatically in MMSASIC on CMM2
Author
Message
Herry Senior Member Joined: 31/05/2014 Location: AustraliaPosts: 261
Posted: 07:02am 29 Aug 2020
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: AustraliaPosts: 6547
Posted: 07:05am 29 Aug 2020
You remember correctly The semi-colon is your friend
CLS PRINT "hello"; PRINT " there!"
Jim
Herry Senior Member Joined: 31/05/2014 Location: AustraliaPosts: 261
Posted: 07:19am 29 Aug 2020
I tried it TJ and it did not work for me! PRINT@(100,200)"hello";
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6547
Posted: 07:29am 29 Aug 2020
Works for me.
CLS PRINT@(100,200)"hello"; PRINT " there!"
capsikin Guru Joined: 30/06/2020 Location: AustraliaPosts: 342
Posted: 07:31am 29 Aug 2020
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: AustraliaPosts: 2981
Posted: 07:31am 29 Aug 2020
Hi Herry,
Can you post a photo of what you get?
I get the correct result from Jim's example?
Kind Regards
Mick
Herry Senior Member Joined: 31/05/2014 Location: AustraliaPosts: 261
Posted: 07:34am 29 Aug 2020
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!)
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11636
Posted: 07:35am 29 Aug 2020
Works properly as expected
CLS PRINT @(100,100)"hello"; PRINT " there!"
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6547
Posted: 07:40am 29 Aug 2020
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.
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2981
Posted: 07:44am 29 Aug 2020
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
Herry Senior Member Joined: 31/05/2014 Location: AustraliaPosts: 261
Posted: 07:50am 29 Aug 2020
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 ;
capsikin Guru Joined: 30/06/2020 Location: AustraliaPosts: 342
Posted: 08:03am 29 Aug 2020
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: AustraliaPosts: 261
Posted: 07:44pm 29 Aug 2020
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.
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5994
Posted: 06:38am 31 Aug 2020
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..
Herry Senior Member Joined: 31/05/2014 Location: AustraliaPosts: 261