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

Print formatted numbers #59

Open
neilsf opened this issue Jul 15, 2019 · 1 comment
Open

Print formatted numbers #59

neilsf opened this issue Jul 15, 2019 · 1 comment

Comments

@neilsf
Copy link
Owner

neilsf commented Jul 15, 2019

This request emerged in the discussion on issue #52.

It's about a command to be added that prints integers as unsigned numbers. It would also be nice to print hex or binary numbers. I don't think I'll have time for some very sophisticated thing like sprintf or PRINT USING, something simplier should do the job.

Ideas:

  • a new I/O command, e. g. FPRINT number, "format" or
  • a new string command, e. g. STR number, string$, "format" (because it would be similar to CBM BASIC's STR$() function that converts a number to string)

The difference is that the former prints directly while the latter only does the conversion and copies it into a string that can be subsequently PRINTed or TEXTATed.

@neilsf neilsf added the enhancement New feature or request label Jul 16, 2019
@neilsf neilsf added this to the Version 2.1 milestone Jul 16, 2019
@neilsf neilsf removed this from the Version 2.1 milestone Aug 7, 2019
@neilsf neilsf added Extension and removed enhancement New feature or request labels Aug 7, 2019
@adegeo
Copy link

adegeo commented Aug 12, 2020

I think this should really be promoted as high priority. String manipulation is one of the strengths of a BASIC language over other languages. I'm currently struggling on how to convert numbers into string representations and combine them to build commands to send to the 1541. Tough to do when I can't simply do device$ + " " + track$ + " " + sector$.. 🤕

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