Uniface Underground -> Undocumented.Features.Only. Go Home

$ustat

Name $ustat
Return some values about devices tables
Synopsis variable = $ustat(Value)
Use Tested in form components.
Description This function allows access to the dimension of a device table depending defined for any Device Mode (0-7) (Defined Print Job Model,...)

This function can be useful in order to configure automatically the printers needed for your application. 

Tested in 5.2.g and 7.2.03

Return Value The value pased to this function MUST the constant value, no variables, fields or registers allowed.
 
Param call Description
$result = <DEVICE_TYPE> $1 = $ustat(19) init for consult a device type. Return 0 when success
$result = 1 $1 = $ustat(30)1 Return the Horizontal size of mode 0
$result = 2 $1 = $ustat(30)1 Return the Vertical size of mode 0
$result = 3 $1 = $ustat(30)1 Return the Width of mode 0
$result = 4 $1 = $ustat(30)1 Return the Height of mode 0
$result = 0 $1 = $ustat(30)1 In $result the description of this mode

1Use 31 through 37 for modes 1 thru 7, and the value 20 for the current display. 

Example entry describe_mode
params
   string device : IN
   numeric mode : IN
   string description : OUT
   numeric hsize : OUT
   numeric vsize : OUT
   numeric width : OUT
   numeric height : OUT
endparams
variables
   string dummy
endvariables

$result = device
$result = $ustat(19)
if ($result = 0)  ; if exists
   selectcase mode
   case 0         ; values for mode 0
      $result = 0
      dummy = $ustat(30)
      description = $result
      $result = 1
      hsize = $ustat(30)
      $result = 2
      vsize = $ustat(30)
      $result = 3
      width = $ustat(30)
      $result = 4
      height = $ustat(30)
    case 1         ; values for mode 1
      $result = 0
      dummy = $ustat(31)
      description = $result
      $result = 1
      hsize = $ustat(31)
      $result = 2
      vsize = $ustat(31)
      $result = 3
      width = $ustat(31)
      $result = 4
      height = $ustat(31)
    case ....
     ....
    endselectcase
endif
end
 


Copyright © 1999-2000  $UUU  All rights reserved.
Disclaimer. | Site Comments.