Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cprint and cfprint text mode routines
#11
(09-23-2023, 08:22 PM)bplus Wrote: Interesting how you did checking on/off with subs!

But you left out comparing to standard way with Color + Locate + Print

I am weighing the cost of extra lines of code for subs and ease of typing one line instead of 3 with standard 3 maybe try good ole CLP sub:

Sub CLP(fg, bg, row, col, text$)
color fg, bg
locate row, col
print text$;
end sub

Remember though, part of the idea here is: "without altering global color values or background colors".

For the "not alter global colors", you could:
OFG = _DEFAULTCOLOR
OBG = _BACKGROUNDCOLOR
....stuff
COLOR OFG, OBG
END SUB

But to maintain background colors, you'd need to get POINT (x, y)....

Which ends up with what's going on in these routines, but with _Mem commands.
Reply


Messages In This Thread
RE: cprint and cfprint text mode routines - by SMcNeill - 09-23-2023, 08:31 PM



Users browsing this thread: 1 Guest(s)