io::read_command!
[−]
[src]
macro_rules! read_command { () => ({ match { read_character!() } { Some(47) => read_command!(0u64), _ => None , } }); ($start: expr) => ({ extern crate io; read_command!($start, io::ffi::BUFF_READ_COMMAND) }); ($start: expr, $limit: expr) => ({ fn result ( acc: u64, lim: usize ) -> Option<u64> { match { (read_character!(), lim) } { (Some(d @ 97...122), lim) if lim != 0 => { result(10 + acc * 100 + {d - 97i8} as u64, lim -1) }, _ => Some(acc), } } result($start as u64, $limit) }); }
The read_command
macro reads and
returns the concat of all letter.