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



Users browsing this thread: 5 Guest(s)