[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print Statement with more than one comma in a row fails


Le 23/05/2025 à 03:24, Lee a écrit :
On 5/22/25 7:48 PM, Brian G wrote:
I am not sure if it is a bug or a feature but if I put two commas in a row in a print statement, i get a syntax error.

But i seem to think that a comma is a tab, and in the past you could do:

print "a",,"b"

to get a double tab, Am I wrong in expecting the print statement to perform that correctly?

Same with

print "a";;"b"

which does include two spaced, but

print "a";;;"b"

is a syntax error

I think this worked at some point in the past...

I get a syntax error on all three Print statements with Gambas 3.20.

On Gambas 3.18, I get "Unexpected ','" for the first and "Unexpected ';'" for the third. The second works.



I don't know what you are talking about. This syntax has not changed since Gambas 1.0.

Print A,B -> prints a tab character between A and B
Print A;;B -> prints a space between A and B
Print A;B -> prints nothing between A and B
Print A; -> do not print the newline character after A

Everything else should raise a compiler error.

Regards,

--
Benoît Minisini.


References:
Print Statement with more than one comma in a row failsBrian G <brian@xxxxxxxxxxxxxxxx>
Re: Print Statement with more than one comma in a row failsLee <t.lee.davidson@xxxxxxxxx>