Skip to content

Commit 1d5c392

Browse files
author
Arthur Melton
committed
Can get all the args in once "arg()"
1 parent 80ef0d2 commit 1d5c392

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

src/run/functions.rs

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -200,20 +200,6 @@ pub fn getstring(
200200
}
201201
skips = leng;
202202
} else if vec[y] == "arg" {
203-
imput_s.push_str(
204-
env::args()
205-
.nth(math(
206-
y,
207-
vec.to_vec(),
208-
memory_names.clone(),
209-
memory_values.clone(),
210-
func_names.clone(),
211-
func_par.clone(),
212-
func_code.clone(),
213-
) as usize)
214-
.unwrap()
215-
.as_str(),
216-
);
217203
let mut leng = 0;
218204
let mut n2 = 0;
219205
let mut skip1 = false;
@@ -237,6 +223,27 @@ pub fn getstring(
237223
}
238224
}
239225
skips = leng;
226+
if leng == 2 {
227+
imput_s.push_str(
228+
&(env::args().map(|arg| arg.to_string() ).collect::<Vec<String>>().join("zzGVgfHaNtPMe7H9RRyx3rWC9JyyZdMkc2v").to_owned())[..]
229+
);
230+
}
231+
else {
232+
imput_s.push_str(
233+
env::args()
234+
.nth(math(
235+
y,
236+
vec.to_vec(),
237+
memory_names.clone(),
238+
memory_values.clone(),
239+
func_names.clone(),
240+
func_par.clone(),
241+
func_code.clone(),
242+
) as usize)
243+
.unwrap()
244+
.as_str(),
245+
);
246+
}
240247
} else if vec[y] == "round" {
241248
imput_s.push_str(
242249
round(

0 commit comments

Comments
 (0)