Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_printmode ???
#2
(10-10-2023, 07:36 PM)James D Jarvis Wrote: why doesn't this work?

Code: (Select All)
Screen _NewImage(400, 300, 32)
dm = _PrintMode
_PrintMode _KeepBackground
Print "X"
_printmode dm

this is a simplified example from what I was doing but it produces the same syntax error. I was able to get arround the problem but this is just annoying:

Code: (Select All)
Screen _NewImage(400, 300, 32)
dm = _PrintMode
_PrintMode _KeepBackground
Print "X"
Select Case dm
    Case 1
        _PrintMode _KeepBackground
    Case 2
        _PrintMode _OnlyBackground
    Case 3
        _PrintMode _FillBackground
End Select
_PRINTMODE does not accept a numeric value as a mode parameter, only _KEEPBACKGROUND, _ONLYBACKGROUND, and _FILLBACKGROUND.

I agree though, this seems like an oversight. If the _PRINTMODE function gives you a numeric value it should also allow a numeric value between 1 and 3 as a valid mode.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
_printmode ??? - by James D Jarvis - 10-10-2023, 07:36 PM
RE: _printmode ??? - by TerryRitchie - 10-10-2023, 08:16 PM
RE: _printmode ??? - by TerryRitchie - 10-10-2023, 08:31 PM



Users browsing this thread: 1 Guest(s)