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

Support FUNCTIONs and SUBs #21

Closed
flagxor opened this issue Sep 20, 2018 · 6 comments
Closed

Support FUNCTIONs and SUBs #21

flagxor opened this issue Sep 20, 2018 · 6 comments
Assignees
Labels
QBasic Needed for better QBasic compat

Comments

@flagxor
Copy link
Collaborator

flagxor commented Sep 20, 2018

This is needed to support a bunch of the qbasic programs like GORILLA.BAS + NIBBLES.BAS

@flagxor flagxor self-assigned this Sep 20, 2018
@flagxor flagxor added Documentation QBasic Needed for better QBasic compat and removed Documentation labels Sep 20, 2018
@FellippeHeitor
Copy link
Collaborator

For Gorilla.bas to run as is, DEF FN should also be considered.

@hax
Copy link

hax commented Sep 21, 2018

Could we throw a error message for unimplemented feature now?

(When I see this project I'm excited because it make me recall my childhood, so I searched the source for GORILLA.BAS and try it, but just get the black screen with silence, make me a little frustrating :)

@FellippeHeitor
Copy link
Collaborator

@hax: Use QB64 until wwwbasic gets there :-)

@flagxor
Copy link
Collaborator Author

flagxor commented Sep 22, 2018

Yeah, would like to get this sorted soon.
It's a largish change as it adds call frames, but getting close.

DEF FN will be part of the same change.

@FellippeHeitor
Copy link
Collaborator

The only difference between a FUNCTION and an FN is scope, really, as DEF FN can access local variables. We haven't gotten it working in QB64 so far (we ship a slightly modified version of gorilla.bas that has DEF FN turned into FUNCTION to work).

@flagxor
Copy link
Collaborator Author

flagxor commented Sep 27, 2018

Implemented (roughly) in:
95489f9

Will sort out any bugs in other issues.

@flagxor flagxor closed this as completed Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QBasic Needed for better QBasic compat
Projects
None yet
Development

No branches or pull requests

3 participants