Macro drone_core::print[][src]

macro_rules! print {
    ($str:expr) => { ... };
    ($($arg:tt)*) => { ... };
}

Prints to the log port #0, if the debug probe is connected.

Equivalent to the println! macro except that a newline is not printed at the end of the message.

Note that log port is buffered so it may be necessary to use log::flush to ensure the output is emitted immediately.

Use print! only for the primary output of your program. Use eprint! instead to print error and progress messages.

Examples

use drone_core::{log, print};

print!("this ");
print!("will ");
print!("be ");
print!("on ");
print!("the ");
print!("same ");
print!("line ");

log::flush();

print!("this string has a newline, why not choose println! instead?\n");

log::flush();