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

problem passing _mem(var) as an argument to a subroutine #109

Open
BlameTroi opened this issue Jan 15, 2021 · 1 comment
Open

problem passing _mem(var) as an argument to a subroutine #109

BlameTroi opened this issue Jan 15, 2021 · 1 comment

Comments

@BlameTroi
Copy link

Describe the bug
I'm playing around with _MEM and I was passing a _MEM() of a variable to a subroutine. Last night late I actually got a compiler error and got around it by using a temporary variable. I tried to reproduce it today so I could report it and now I get an error message "1st sub argument requires 'TYPE _MEM'" on the call to the subroutine.

QB64 info (please complete the following information):

To Reproduce
Steps to reproduce the behavior:
attached compilerError.bas file shows the error in line 19.

simply, define a sub with a _MEM argument, as in

SUB FRED (m AS _MEM, n$):

and from elsewhere in the program call it, as in

compilerError.bas.txt
FRED _MEM(a), "a"

Expected behavior
I would expect the result of the _MEM() function to be recognized as being of TYPE _MEM and to pass without issue.

@FellippeHeitor
Copy link
Contributor

Thanks for reporting, @BlameTroi

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

2 participants