DUMP |
Display Variables |
1. |
Display Variables: |
DUMP[ (chan) ] { * | OBJECT obj_id | level | GOTO} |
2. |
Hide Variables: |
DUMP DISABLE variable [, variable , ...] |
* |
If using the asterisk as an argument, all levels are dumped. |
chan |
Channel or logical file number of the file to receive the dump/output of all variables in use by the current program. |
level |
Program level to dump (current level dumped if omitted). If the value is negative, it is considered the relative number based on the current level (i.e. -1 will dump the level that called the current program). |
variable |
Can be either a string or numeric variable that you do not want to be displayed during a DUMP operation. This can be used to hide sensitive information such as passwords and encryption keys. |
Jump History: | |
GOTO |
Keyword to request a dump of the jump history queue. |
Object Oriented Programming (OOP): | |
OBJECT |
Keyword to request a dump of an active object. |
obj_id |
Object identifier of the object. |
Use the DUMP directive to get a listing of all variables in use by the current program/object. The output is sent to the specified file number. If you omit the file number, the console, file (0), is the default.
The output includes the value of the system variable ERR, the current program name, line number, the FOR/NEXT-GOSUB/RETURN stack, and all variables.
The DUMP DISABLE directive is used if you do not want a variable to be displayed during a DUMP operation.
(The DUMP OBJECT directive was added in PxPlus v7.00.)
(The DUMP GOTO directive was added in PxPlus v10.10.)
(The DUMP DISABLE directive was added in PxPlus 2023.)
Example 1 - The following illustrates the use of DUMP for listing variables in a program:
dump
! ERR=0, CTL=0, RET=2
! Level=1
! PGN="C:\OTHER\PGMS\PVX\PVX_TESTS"
A$=$000000$+"T0 "+$0F0000000000000000$+"*"+$0100000700$+"CON"+$0000$+"P"+$190100000000$+"P"+$190000$+"P"+$19000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000$+"WINDOWS"
CUST$="<*> IOLIST NAME$,ADR1$,ADR2$"
CUST.ADR1$="123 SOME ST."
CUST.ADR2$="ANYTOWN SK S0M 0V0"
CUST.NAME$="M MOUSE"
DT$="04/01/99"
F$="abcd"
R$="ab"
X$="M MOUSE"+sep+"123 SOME ST."+sep+"ANYTOWN SK S0M 0V0"+sep
%NORM_SCR$=esc+"F7"+esc+"B4"
%ST_ATTR$=$000007$
%W_MSG$=esc+"F0"+esc+"B6"
Example 2 - The following illustrates the use of DUMP OBJECT:
dump object 100015
! Dump of OBJECT information
_Obj=100015
_Class$="*rpt/RptSort"
_Refcnt=1
! External Properties
Order$="A"
Length=6
Type$="S"
SegmentName$="AccountID"
Example 3 - The following illustrates the use of DUMP GOTO:
->set_param 'TJ'=100 | ||||||
From |
Dir |
To |
Loops |
Err |
From |
To |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||||||
00050 |
ENTER |
08000 |
|
36 |
C:\pxplus\lib\__ |
|
08060 |
GOTO |
00100 |
|
|
C:\pxplus\lib\__ |
|
00130 |
GOSUB |
05000 |
|
|
C:\pxplus\lib\__ |
|
05150 |
ON |
05230 |
|
|
C:\pxplus\lib\__ |
|
05260 |
GOTO |
05400 |
|
|
C:\pxplus\lib\__ |
|
05420 |
EXITTO |
09000 |
|
|
C:\pxplus\lib\__ |
|
Example 4 - The following illustrates the use of DUMP DISABLE to hide the password property from the dump:
def class "user"
property name$
local password$
function checkPassword(checkPassword$)checkPassword
end def
!
on_create:
enter name$,password$
dump disable password$
password$=hsh(password$,512)
return
!
checkPassword:
enter checkPassword$
if hsh(checkPassword$,512)=password$ \
then return 1
return 0