Definition: |
sequence s = video_config()
|
|||||||||||||||||||||||||||||||||
Description: |
Returns a sequence of 10 non-negative integer values describing the current video configuration.
Somewhat a legacy routine from DOS32 days, which may however still be useful for some items (4
out of 10, ie {3,4,9,10}):
|
|||||||||||||||||||||||||||||||||
Comments: | Beyond saying that VC_LINES and VC_COLUMNS are the size of the buffer, usually larger
than VC_SCRNLINES and VC_SCRNCOLS, which are the size of the visible area, the choice
of which is required is application specific, however the last two items are probably
more likely to be useful.
In phix, the VC_XXX constants are automatically defined, see psym.e/syminit(). |
|||||||||||||||||||||||||||||||||
Example: |
vc = video_config() -- vc is eg {1, 3, 300, 80, 0, 0, 32, 1, 25, 80} if length(vc)>=VC_SCRNCOLS then lines = vc[VC_SCRNLINES] cols = vc[VC_SCRNCOLS] else -- (RDS Eu compatibility) lines = vc[VC_LINES] cols = vc[VC_COLUMNS] end if |
|||||||||||||||||||||||||||||||||
Compatibility: |
RDS Eu requires include graphics.e and returns a sequence of 8 elements only.
OpenEuphoria requires include std/graphcst.e
Should you require a routine that is compatible across Phix, RDS Eu, and OpenEuphoria, then I suggest that you adapt/rename the one in builtins\pscreen.e, and perhaps rely on/copy the VC_XXX constants in builtins\graphics.e, rather than struggle with those other include files/builtins, especially with regards to RDS Eu. |