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

Comal: Support for CHAIN #9

Open
stevewpalmer opened this issue Nov 28, 2024 · 0 comments
Open

Comal: Support for CHAIN #9

stevewpalmer opened this issue Nov 28, 2024 · 0 comments

Comments

@stevewpalmer
Copy link
Owner

This is not yet implemented as it would be limited to compiled programs as the Comal run-time has no standalone functionality to dynamically compile Comal source. I suspect other Comal compilers have the same restriction but it would be worth looking into. I don't believe the CHAIN command is used widely enough to warrant refactoring to add source-level chaining.

Assuming this is limited to compiled executables then it should be simple enough to add if we approach this in the same way as forking a new process.

What is the user experience when running CHAIN from the interpreter? In standard Comal interpreters, the program in memory is replaced by the one being CHAIN'ed. The official Comal spec states:

Programs already in main storage will be deleted when the CHAIN statement is invoked. Only programs stored by means of the SAVE command can be retrieved via CHAIN.

This won't actually be the case here. In theory, CHAIN from within the interpreter could load, compile and run Comal source directly but this divergence between behaviours within the interpreter and stand-alone executables isn't something that should be sanctioned as it would break consistency.

@stevewpalmer stevewpalmer changed the title Comal support for CHAIN Comal: Support for CHAIN Jan 5, 2025
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

1 participant