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

[Wiki problem] Function syntax is unclear #14

Open
Clozent opened this issue Aug 22, 2023 · 2 comments
Open

[Wiki problem] Function syntax is unclear #14

Clozent opened this issue Aug 22, 2023 · 2 comments

Comments

@Clozent
Copy link

Clozent commented Aug 22, 2023

I tried to use a program that uses this syntax, and I can't find, for example, information on how to specify parameter names in funtions.

Is it:
function(arg_name="value"),
function(arg_name:"value"),
or is it something else?

@RacoonDog
Copy link
Contributor

you cant specify specific arguments, you need all arguments in correct order

@HoratioGamer
Copy link

Ok, this is a different meaning of the word function, as in subroutine or procedure, a user declared function.

I see listed in the code below Call, Jump, JumpIfTrue, under the comment Instructions used by StarScript... these seem to match programming concepts I have run across in all sorts of languages, and it would change how I think of StarScript.

These would seem to imply the ability to define subroutines or procedures and separately do flow control jumping to line numbers / labels or something to accomplish conditionals and loops? This seems really powerful. Can the Calls and Jumps move flow control to a different line in a multi-line StarScript script in a Meteor macro ? This seems ridiculously powerful and very interesting. Where do I find documentation or further information to explain how to do that ?

https://github.com/MeteorDevelopment/starscript/blob/master/src/main/java/org/meteordev/starscript/Instruction.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants