[Coco] ? OS ERROR

Allen Huffman alsplace at pobox.com
Sun Apr 30 14:26:22 EDT 2023


> On Apr 30, 2023, at 1:23 PM, coco--- via Coco <coco at maltedmedia.com> wrote:
> 
> 210 OPEN "R",#1,F$
> 215 OPEN "DW",#2,O$,RL
> 220 FIELD #2,RL AS OD$
> 225 RN=1
> 230 'REPEAT LOOP UNTIL END OF FILE.
> 235 :INPUT #1,IT$
> 236 :D$=IT$


It depends on how large RL is. You only get 200 bytes of string space by default, and you can CLEAR 0 to get none, or CLEAR 5000 to get 5000.

When I dove in to this for my “string theory” blog posts, I discovered that there are temporary strings needed, so even if you think you only need 200 bytes, doing any type of string manipulation will error out since it has to make copies in string memory when it’s doing that.

Even A$=A$+”” can fail.

Without calculating how much you need, you could always just CLEAR larger numbers until it works.

--
Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT only)
http://www.subethasoftware.com - https://www.facebook.com/subethasoftware




More information about the Coco mailing list