pub fn format_examples() {
        log("\n\nformat_examples:\n");
        let message: String = format!("format returns a formatted string");
        log(&message);

        let an_arg ="third";
        let message = format!("format can receive argument using {{}}: {}, {}, {}.", 1, "second", an_arg);
    
        log(&message);

        let (first, second, third) = (1, "segundo", an_arg);
        let message = format!("We can specify arguments by variable name: {first}, {second}, {third}.");

        log(&message);

        let message = format!("We can specify the ordering of arguments for format: {1}, {2}, {0}.", third, first, second);

        log(&message);

        let (first, second, third) = (1, 2, 3);
        let message = format!("We can show integers with specified digits: {:02}, {:04}, {:6}.", first, second, third);
        log(&message);

        let message = format!("Specifying digits and argument ordering: {2:02}, {0:4}, {1:06}.", second, third, first);
        log(&message);

        let (first, second, third) = (0.1, 1.23, -2.45);
        let message = format!("Specify precision for floating points: {:.2}, {:.4}, {:.6}", first, second, third);
        log(&message);

        let message = format!("Specifying both precision and digits: {:2.2}, {:04.4}, {:06.6}", first, second, third);
        log(&message);

        let message = format!("Specify precision, digits and ordering of arguments: {1:02.2}, {2:4.4}, {0:06.6}", third, first, second);
        log(&message);

        let message = format!("Same as previous one but with variable names: {first:2.2}, {second:04.4}, {third:6.6}");

        log(&message);

        log("\n\n----------------------------------------------------------------------\n\n");
    }
/// examples for format!
/// check the message output for each format! use
examples for format.
check the message output for each format. use
examples for format . check the message output for each format . use
pub fn format_examples() {
        log("\n\nformat_examples:\n");
        let message: String = format!("format returns a formatted string");
        log(&message);
        let an_arg ="third";
        let message = format!("format can receive argument using {{}}: {}, {}, {}.", 1, "second", an_arg);
        log(&message);
        let (first, second, third) = (1, "segundo", an_arg);
        let message = format!("We can specify arguments by variable name: {first}, {second}, {third}.");
        log(&message);
        let message = format!("We can specify the ordering of arguments for format: {1}, {2}, {0}.", third, first, second);
        log(&message);
        let (first, second, third) = (1, 2, 3);
        let message = format!("We can show integers with specified digits: {:02}, {:04}, {:6}.", first, second, third);
        log(&message);
        let message = format!("Specifying digits and argument ordering: {2:02}, {0:4}, {1:06}.", second, third, first);
        log(&message);
        let (first, second, third) = (0.1, 1.23, -2.45);
        let message = format!("Specify precision for floating points: {:.2}, {:.4}, {:.6}", first, second, third);
        log(&message);
        let message = format!("Specifying both precision and digits: {:2.2}, {:04.4}, {:06.6}", first, second, third);
        log(&message);
        let message = format!("Specify precision, digits and ordering of arguments: {1:02.2}, {2:4.4}, {0:06.6}", third, first, second);
        log(&message);
        let message = format!("Same as previous one but with variable names: {first:2.2}, {second:04.4}, {third:6.6}");
        log(&message);
        log("\n\n----------------------------------------------------------------------\n\n");
    }
pub fn format_examples ( ) { log ( " \n \n \n " ) ; let message : String = format ! ( " " ) ; log ( & message ) ; let an_arg = " " ; let message = format ! ( " " 1 " " an_arg ) ; log ( & message ) ; let ( first , second , third ) = ( 1 , " " , an_arg ) ; let message = format ! ( " " ) ; log ( & message ) ; let message = format ! ( " " third first second ) ; log ( & message ) ; let ( first , second , third ) = ( 1 , 2 , 3 ) ; let message = format ! ( " " first second third ) ; log ( & message ) ; let message = format ! ( " " second third first ) ; log ( & message ) ; let ( first , second , third ) = ( 0.1 , 1.23 , - 2.45 ) ; let message = format ! ( " " first second third ) ; log ( & message ) ; let message = format ! ( " " first second third ) ; log ( & message ) ; let message = format ! ( " " third first second ) ; log ( & message ) ; let message = format ! ( " " ) ; log ( & message ) ; log ( " \n \n \n \n " ) ; }
examples for format!
examples for format!