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

CLR #18

Closed
ukcroupier opened this issue Mar 3, 2020 · 2 comments
Closed

CLR #18

ukcroupier opened this issue Mar 3, 2020 · 2 comments
Assignees
Milestone

Comments

@ukcroupier
Copy link

Hit a problem while writing a 10 liner.

There is no RUN command and no CLR command, so resetting arrays becomes a problem unless you write a routine to do it yourself (which uses extra space that 10 liners don't have)

here's what I mean in a nutshell:

for i=1 to 99
dim x(999)
next i

After a few loops this crashes with a memory error. In Atari or Turbo Basic I would just add a CLR command or even start the program again with a RUN.

Of course, in a sensible program this wouldn't be an issue - but 10 line coding tends to be a bit wild and loose.

@dmsc
Copy link
Owner

dmsc commented Mar 3, 2020

There is no RUN command and no CLR command, so resetting arrays becomes a problem unless you write a routine to do it yourself (which uses extra space that 10 liners don't have)

here's what I mean in a nutshell:

for i=1 to 99
dim x(999)
next i

You are right, it should be a way to free memory. But it is not easy without also clearing all variables back to 0.

Do you think that would be reasonable?

@ukcroupier
Copy link
Author

CLR on Atari & Turbo also clears variables to 0 so I don't see this as a problem, in fact I would expect it.

@dmsc dmsc added this to the v4.4 milestone Mar 3, 2020
@dmsc dmsc self-assigned this Mar 3, 2020
@dmsc dmsc closed this as completed in e63c6ad Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants