Problems with serial Print syntax

This is my code to print LF= then insert the random number Serial.print("LF=", randNumber1); But I get this error Invalid conversion from 'const char*' to 'long int' I could switch the variable to short or int but I don't think that is the problem. Probably a very simple fix that I'm not seeing.

Thanks Steve

the fix is: Serial.print("LF="); Serial.print( randNumber1);

Thanks that was too simple. I guess I was trying to reduce the program size.

Thanks Steve

There are some C++ tricks you can use to print more then one value in a single line of source code, but that doesn't reduce the size of the runtime code and it can be confusing if you are not familiar with C++

You can read more in this thread: