C++ Propper syntax

In every function that I have, I want to print what is going on in it on the controller screen. So I do Controller.print (“bluh”);
That’s easy. My question is if I can add variables to it? Can I do “bluh” + var + “bluh” as an example? There should be a wya to do it. I usually program in java so idk what the syntax is.

The controller screen is not going to be your savior in the manner you describe. There is a limit of one message to it every 50ms. Any messages more frequent than that will be ignored by VEXos. It’s still usable as a tool, but best practice would instead be creating a separate thread manage the actual act of writing to it so as to avoid getting messages chopped off by the 50ms blackout window. As for how it works, it uses a standard C formatted text string. Look up the C printf command for how it’s used. The basic idea is you give it one string, “Gyro reads %f degrees, time is %d ms”, then add in extra arguments to substitute into the various placeholders in the format string (%f and %d in my example).

@John TYler thank you