Re-created the fibonacci code and put programs into their own folder
This commit is contained in:
parent
6f3295dc5e
commit
95dde6e2c9
4 changed files with 36 additions and 3 deletions
|
|
@ -9,7 +9,7 @@ fn main() {
|
|||
// Parse command line arguments
|
||||
let args: Vec<String> = env::args().collect();
|
||||
let mut system_type = "basic".to_string();
|
||||
let mut program_file = "fibonacci.bin".to_string();
|
||||
let mut program_file = "programs/fibonacci.bin".to_string();
|
||||
|
||||
let mut i = 1;
|
||||
while i < args.len() {
|
||||
|
|
@ -119,7 +119,7 @@ fn load_program_data(filename: &str) -> Result<Vec<u8>, String> {
|
|||
}
|
||||
Err(e) => {
|
||||
// If file doesn't exist, try to use default program
|
||||
if filename == "fibonacci.bin" {
|
||||
if filename == "programs/fibonacci.bin" {
|
||||
println!(
|
||||
"DEBUG: File {} not found ({}), using default fibonacci program",
|
||||
filename, e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue