Update README.md

This commit is contained in:
Jonathan Turner 2016-03-31 07:07:33 -07:00
parent efb7b31487
commit be3d360913

View File

@ -49,16 +49,7 @@ fn main() {
You can also evaluate a script file: You can also evaluate a script file:
```Rust ```Rust
extern crate rhai; if let Ok(result) = engine.eval_file::<i32>("hello_world.rhai") { ... }
use rhai::Engine;
fn main() {
let mut engine = Engine::new();
if let Ok(result) = engine.eval_file::<i32>("hello_world.rhai") {
println!("Answer: {}", result); // prints 42
}
}
``` ```
# Working with functions # Working with functions