Printing without a new line in BASIC

In BASIC, I know of two instructions for printing to the screen, PRINT

and WRITE

both of which automatically print lines with a newline at the end. I want to print a line without a newline. How can i do this? I am using GW-BASIC.

+3


source to share


1 answer


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

+7


source







All Articles