KEYWORD PUT
KEYWORD PUT
Can someone explain what I’m doing wrong? Or what is happening!
- Attachments
-
- KETWORD PUT.jpg (19.4 KiB) Viewed 776 times
- janbredenbeek
- Super Gold Card
- Posts: 668
- Joined: Wed Jan 21, 2015 4:54 pm
- Location: Hilversum, The Netherlands
- Contact:
Re: KEYWORD PUT
PUT stores data in its internal form in a file, while PRINT stores it in the form as it is printed on the screen.qbits wrote: Thu Aug 24, 2023 12:44 pm Can someone explain what I’m doing wrong? Or what is happening!
An integer variable is 2 bytes, a floating point variable 6 bytes and a string 2 bytes (the length) followed by the bytes of the string itself.
So PRINT#9;"Hello" prints the characters "Hello" followed by an EOL (LF) character to #9
and PUT#9;"Hello" prints the bytes 0, 5, and "Hello" (without LF!) to #9.
-
- Font of All Knowledge
- Posts: 4656
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: KEYWORD PUT
Hi,
I always have problems with PUT, I generally use BPUT to handle bytes inserted into a file or channel.
I always have problems with PUT, I generally use BPUT to handle bytes inserted into a file or channel.
Regards,
Derek
Derek
Re: KEYWORD PUT
Hi,
Thanks janbredenbeek I sort of remembered about the size of Str$ thing but your comments help switch the light back on.
That helped me get to where I wanted. My problem is now solved.
QBITS
Thanks janbredenbeek I sort of remembered about the size of Str$ thing but your comments help switch the light back on.
That helped me get to where I wanted. My problem is now solved.
QBITS