Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simplistic misunderstanding about ; + "" in a print
#1
I may have a simplistic misunderstand about the use of semicolon, strings, plus sign and quotes in print statements.

1 q$=chr$(34)
2 print q$; "test"; q$
3 print q$ + "test" + q$

Output is "test" and "test" on separate lines.  I assumed ? q$; "test"; q$ would be an improper use of concatenation in a print statement.  I thought line 3 was the right way. But it works.
If I try to type q$"" the line changes to q$; "".  Auto corrects and makes me wonder.  I checked this output in the mother tongue "qb45".  Works like qb64.

If the +'s are not needed, do they take cycles and code unnecessary ?  Again wondering.
I know PRINT is most code producing and time wasting part of the source in qb64.

Thanks
Reply


Messages In This Thread
simplistic misunderstanding about ; + "" in a print - by doppler - 09-19-2024, 01:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Disable Print Screen? TerryRitchie 13 2,432 12-25-2023, 07:45 PM
Last Post: Kernelpanic
  Book for sanity/insanity break: "10 PRINT CHR$(205.5+RND(1)); : GOTO 10" CharlieJV 4 1,062 08-22-2023, 08:15 PM
Last Post: bplus
  Print source code from the IDE Kernelpanic 21 3,669 12-17-2022, 06:52 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: 1 Guest(s)