[question] Declare methods in scripts
See original GitHub issueHi, I’m not quite sure if I missed this in the docs, but is something like this possible?
[void] myMethod([int] a) {
}
myMethod(1);
running the above from new EE().ScriptEvaluate()
, myMethod
is defined inside of script, not on input / context, []
means optional.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Writing a script containing just one function definition v.s. ...
For most cases I will declare the functions in the same script that will ... Declaring functions (or writing code) inside of a...
Read more >Can't declare methods in a script being run in PowerShell
I'm invoking a script as described here and exemplified here. It's running and I can see the outputs to the console (both hazaa...
Read more >function declaration - JavaScript - MDN Web Docs - Mozilla
The function declaration creates a binding of a new function to a given name. You can also define functions using the function expression....
Read more >best way to define a function inside a script
Yes, there are now more ways to define a function. And you can now indeed put functions inside scripts. But it is almost...
Read more >What is "right way" to call method from another script?
There is no "right way" to call a method from another object. There is only one way: <reference to the object>.methodName(); And that's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also take note that variables declared in a lambda are scoped (only available) in the lambda block. But for now variables declared in other types of blocks are not scoped to their block.
But
It’s in my todo list to scope variables in each blocks to behave more like in C# but in current version (1.4.18.0) it’s not done.
Great job, thanks!