Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Assign print using to a string.
#7
(04-01-2024, 02:54 AM)eoredson Wrote: The only 2 problems with using the screen is:

1)Have to store/restore area of screen being written to.
2)What if print using output is greater than 80 chars.

Otherwise, yes, screen is more  efficient then file access..

Erik.

1) Just make the screen STATIC so you don't need to create/free it over and over.  It's only going to be a few hundred bytes of memory in the end, after all.

2) You're going to format a single number to more than 80 characters?  That's SOME number!!   Even then, the solution is to just be certain you make the screen large enough to hold the value to begin with.

_NEWIMAGE(800,1,0)  <-- Is 800 characters enough for you to format your number?
_NEWIMAGE(9999, 1, 0)  <--- is 9,999 characters enough?  A normal screen 0 screen is 80x25 characters = 4000 -- you've now got over twice that limit!

Just change the size of that _NEWIMAGE so it's large enough to format that value that you want formatted.  Wink
Reply


Messages In This Thread
Assign print using to a string. - by eoredson - 03-30-2024, 03:29 AM
RE: Assign print using to a string. - by SMcNeill - 03-30-2024, 04:55 AM
RE: Assign print using to a string. - by eoredson - 03-31-2024, 11:23 PM
RE: Assign print using to a string. - by eoredson - 04-01-2024, 02:54 AM
RE: Assign print using to a string. - by SMcNeill - 04-01-2024, 06:04 AM
RE: Assign print using to a string. - by eoredson - 04-02-2024, 12:52 AM
RE: Assign print using to a string. - by SMcNeill - 04-02-2024, 01:36 AM
RE: Assign print using to a string. - by eoredson - 04-02-2024, 01:49 AM
RE: Assign print using to a string. - by SMcNeill - 04-02-2024, 02:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mac print #file crlf? BlameTroi 5 339 02-16-2026, 08:42 PM
Last Post: BlameTroi
  Print strings with accents and special chars Ikerkaz 8 711 12-20-2025, 09:28 PM
Last Post: TempodiBasic
Question Experimenting with a "StringList" type for simpler handling of string arrays/lists Heimdall 18 1,244 12-19-2025, 12:51 PM
Last Post: Heimdall
  Sub not Reconizing Dim as String pmackay 18 1,476 10-16-2025, 03:32 PM
Last Post: pmackay
  Illegal string-number conversion Herve 7 774 07-07-2025, 09:53 AM
Last Post: a740g

Forum Jump:


Users browsing this thread: 1 Guest(s)