Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simplistic misunderstanding about ; + "" in a print
#6
Quote:PRINT a$; b$; c$;    <---- This statement will get translated as if it was actually:
PRINT a$;
PRINT b$;
PRINT c$;
Each of those get printed first to a temp string (for formatting and word wrap and all that), and as you can see from the above, that's a good number of lines.
The reason for this behavior may/could be that in C/C++ every line must end with a semicolon - except main(), loops or the function definition.

Code: (Select All)

//Deklaration
int blabla(int);

int main(void)
{
int feld[10];

for (int i = 1; i <= 10; i++)
{
feld[i] = i;
printf("%3d", feld[i]);
}
return(0);
}

//Definition
int blabla(int i)
{
. . .
}
Reply


Messages In This Thread
RE: simplistic misunderstanding about ; + "" in a print - by Kernelpanic - 09-19-2024, 12:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Disable Print Screen? TerryRitchie 13 2,438 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,064 08-22-2023, 08:15 PM
Last Post: bplus
  Print source code from the IDE Kernelpanic 21 3,679 12-17-2022, 06:52 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: 1 Guest(s)