Difference between revisions of "HEIGHT"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Clippy
m
Line 13: Line 13:
* If {{Parameter|imageHandle&}} is an invalid handle, then an [[ERROR Codes|invalid handle]] error will occur.
* If {{Parameter|imageHandle&}} is an invalid handle, then an [[ERROR Codes|invalid handle]] error will occur.
* The maximum pixel coordinate of a program [[SCREEN|screen]] is one less than what the function returns.
* The maximum pixel coordinate of a program [[SCREEN|screen]] is one less than what the function returns.


''Example:'' Displays the current program window area.
''Example:'' Displays the current program window area.

Revision as of 01:30, 22 August 2011

The _HEIGHT function returns the height of an image handle or current write page.


Syntax

result& = _HEIGHT[(imageHandle&)]


Description

  • If imageHandle& is omitted, it's assumed to be the handle of the current write page.
  • To get the width of the current program window use zero for the handle value: depth& = _HEIGHT(0)
  • If the image specified by imageHandle& is in text mode, the number of characters per column is returned.
  • If the image specified by imageHandle& is in graphics mode, the number of pixels per column is returned.
  • If imageHandle& is an invalid handle, then an invalid handle error will occur.
  • The maximum pixel coordinate of a program screen is one less than what the function returns.


Example: Displays the current program window area.

SCREEN 12 wide = _WIDTH deep = _HEIGHT PRINT "The program screen is"; wide; "X"; deep


See also



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