-
Notifications
You must be signed in to change notification settings - Fork 8
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
Jump Command #67
Comments
How exactly would this work? |
Pop a number off the stack and go to that position in the code. Or maybe two numbers because it's two dimensional source code. |
By position, do you mean character? |
Side note: this is way more complicated than it seems, since you have to handle things like jumping into strings and arrays and code blocks (what happens when you do |
@Hipe99 Yes, the character with the position popped. @kirbyfan64 I think that's a good "feature" to have. |
@phase Very true. What did you mean by 2-dimensional? I thought O was 1-dimensional... |
The row and column in the source code.
|
eh, do newlines count for anything? |
Essentially a goto operator? I also think the position should be done linearly not via line and column. A language in my experience rarely needs to use lines and columns internally besides for debugging, unless it is based around it somehow (which would be annoying in my opinion). |
I'm not to keen on the idea now. If we have to use manual jumps instead of the control flow operators that are built in, we're using the language wrong. |
Putting code in loops can get big, so why not have a jump command? I was thinking
R
would be good.The text was updated successfully, but these errors were encountered: