Difference between revisions of "SCREENEXISTS"

From QB64 Wiki
Jump to navigation Jump to search
imported>SMcNeill
m
m (Reword)
 
Line 14: Line 14:


{{PageExamples}}
{{PageExamples}}
''Example:'' The loop waits until the screen exists to add the title.
''Example:'' The loop busy-waits until the screen exists to add the title.
{{CodeStart}} '' ''
{{CodeStart}} '' ''
{{Cl|SCREEN}} 12
{{Cl|SCREEN}} 12

Latest revision as of 11:06, 5 March 2021

The _SCREENEXISTS function returns true (-1) once a screen has been created.


Syntax

screenReady%% = _SCREENEXISTS


Description

  • Function returns true (-1) once a program screen is available to use or change.
  • Can be used to avoid program errors because a screen was not ready for input or alterations.
    • Use before _TITLE, _SCREENMOVE and other functions that require the output window to have been created.


Examples

Example: The loop busy-waits until the screen exists to add the title.

SCREEN 12 DO: LOOP UNTIL _SCREENEXISTS _TITLE "My Title"


See also



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page