Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add function to bring more fun in console #3

Open
DerpyNewbie opened this issue Oct 19, 2022 · 0 comments
Open

[Feature] Add function to bring more fun in console #3

DerpyNewbie opened this issue Oct 19, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@DerpyNewbie
Copy link
Owner

DerpyNewbie commented Oct 19, 2022

Add new function syntax for even more fun in this console
function <func_name>([vars]){ <commands> [return [value];] }

Which can be called at runtime by
<func_name>([vars])

Which may return value like so
echo <func_name>([vars])

The implementation should allow this example command:

function return_empty_function() {
  echo "return empty func called";
  return;
}

function return_value_func() {
  echo "return value func called";
  return "a value";
}

function print_var_func(var1) {
  echo var1;
  return;
}

return_empty_function();
print_var_func(return_value_func());

Which results in:

return empty func called
return value func called
a value
@DerpyNewbie DerpyNewbie self-assigned this Oct 19, 2022
@DerpyNewbie DerpyNewbie added the enhancement New feature or request label Apr 6, 2024
@DerpyNewbie DerpyNewbie added this to the 0.3.0 milestone Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant