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

Command Documentation #255

Closed
spectrumcomputing opened this issue Mar 26, 2020 · 4 comments
Closed

Command Documentation #255

spectrumcomputing opened this issue Mar 26, 2020 · 4 comments

Comments

@spectrumcomputing
Copy link
Contributor

Hi,

Thanks for Boriel, but is there anyway I can help with documentation?

For example, I go to information about the Screen command at:

https://zxbasic.readthedocs.io/en/latest/screen/

At the bottom of the page there are links to:

At the bottom of the page there is:

See also
CSRLIN
POS
AT

None of these seem to work. I have the same with:

https://zxbasic.readthedocs.io/en/lates ... er/attr.md

If you have any rough notes, I'm happy to type them up for you in Git Flavoured MarkDown.

Best wishes

Peter

@spectrumcomputing
Copy link
Contributor Author

spectrumcomputing commented Mar 26, 2020

Here is a proposed version of attr.md

##Requirements

ATTR is a library function to be included with the following command:

#include <attr.bas>

##Sample usage

#include <attr.bas>

PRINT AT 9, 10;PAPER 4; "A"
LET s = ATTR$(9, 10)
PRINT AT 0, 0; "The attribute of screen position 9, 10 is "; s

##Remarks

  • This function extends the one in Sinclair BASIC (and it's compatible with it) since it also allows rows 22 and 23.

##See also

@spectrumcomputing
Copy link
Contributor Author

This is something very simple I wrote (I'm a beginner), but may help other beginners with the SCREEN, ATTR and POST commands:

#include <screen.bas>
#include <attr.bas>
#include <pos.bas>
CLS
PRINT AT 9, 10;PAPER 4; "A"
LET C$ = SCREEN$(9, 10)
LET A = ATTR$(9, 10)
PRINT AT 0, 0; "The character at 9, 10 is ";C$
PRINT AT 6, 0; "The Attribute at 9, 10 is ";A
PRINT AT 12,0;"0123456789";
Let P = POS()
PRINT AT 18,0; "Current Column Position is ";P
PRINT AT 22,0;"I'm Printing in Row 22 & 23!!"
PRINT AT 23,0; "Press A Key"
PAUSE 0

@boriel
Copy link
Owner

boriel commented Mar 26, 2020

Many thanks for this. I'll review them after work :)

@boriel
Copy link
Owner

boriel commented Mar 26, 2020

Please, issue a Pull Request. I'll merge or discuss it in the PR. :-)

@boriel boriel closed this as completed Mar 30, 2020
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