Print without newline
Asked Answered
A

1

8

In BASIC I know of two instructions to print to the screen, PRINT, and WRITE, both of which automatically print strings with a newline at the end. I want to print a string without a newline. How can I do this? I'm using GW-BASIC.

Archiepiscopate answered 6/5, 2017 at 0:41 Comment(0)
L
18

Using PRINT with a semicolon will not print a new line:

10 REM The trailing semicolon prevents a newline
20 PRINT "Goodbye, World!";

Source: Rosettacode

Lakendra answered 6/5, 2017 at 0:56 Comment(2)
Yes, that is correct and I gave you credit for that. However, it doesn't work in Business Basic. Please see this URL: :documentation.basis.com/BASISHelp/WebHelp/commands2/…Orthohydrogen
Just found out that in Business Basic instead of using a semicolon (;) we have to use a comma (,)Orthohydrogen

© 2022 - 2024 — McMap. All rights reserved.