New Arduinist has question

Hi

I have a two questions but I'll keep them separate. One at a time might be best.

I'm displaying a number value from a sensor in serial terminal. This number can change over time to a positive number or a negative number. This is my question:

as the number in serial terminal is aligned at the left, when a minus (-) value is displayed, it looks messy to me.
e.g:
295.53
-295.93

I'd like to display the values as like this:

295.53
-295.53
(so that the numbers are aligned)

How can I do this? Does anyone now a special trick? Sorry if I'm being a dumbass. :roll_eyes:

A simple IF statement should suffice.

if(value > 0) Serial.print(" "); //prints a space before the value
Serial.println(value); //"-value"

It worked! You're my new God. worships

slight correction:
if(value >= 0) Serial.print(" "); //prints a space before the value
Serial.println(value); //"-value"

Thanks dude.

Lol, your welcome.