We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1697e0f commit 44c0266Copy full SHA for 44c0266
src/main.rs
@@ -570,6 +570,15 @@ impl Executor {
570
}
571
572
573
+ // Get command-line arguments
574
+ "args-cmd" => self.stack.push(Type::List(
575
+ env::args()
576
+ .collect::<Vec<_>>()
577
+ .iter()
578
+ .map(|x| Type::String(x.to_string()))
579
+ .collect::<Vec<Type>>(),
580
+ )),
581
+
582
// Commands of control
583
584
// evaluate string as program
@@ -964,9 +973,10 @@ impl Executor {
964
973
if let Some(value) = self.stack.pop() {
965
974
value
966
975
} else {
967
- self.log_print(format!(
976
+ self.log_print(
968
977
"Error! There are not enough values on the stack. returns default value\n"
969
- ));
978
+ .to_string(),
979
+ );
970
980
Type::String("".to_string())
971
981
972
982
0 commit comments