P VX Language
P VX Language
30
Language Reference
Contents iii
Preface xiii
Introduction 17
Directives 27
System Functions 385
System Variables 551
Mnemonics 573
System Parameters 649
Control Object Properties 697
Special Files and Devices 731
Special Command Tags 763
Appendix 803
Error Codes and Messages 822
Index 837
ProvideX is a trademark of Sage Software Canada Ltd.
All other products referred to in this document are trademarks or registered trademarks of their
respective trademark holders.
The capabilities, system requirements and/or compatibility with third-party products described herein
are subject to change without notice. Refer to the Sage ProvideX website www.pvx.com for
current information.
Preface
Using this Documentation . . . . . . . . . . . . . . . . . . xiii Chapter Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
1. Introduction
About ProvideX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Punctuation/Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2. Directives
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 DEF GID/UID Define Group/User ID . . . . . . . . . . . . . 66
ACCEPT Read Single Keystroke . . . . . . . . . . . . . . . . . . . 28 DEF FN Define Function . . . . . . . . . . . . . . . . . . . . . . . . 67
ADD INDEX Add Key to Keyed File . . . . . . . . . . . . . . . 29 DEF MSG Define Temporary Message . . . . . . . . . . . . 69
ADDR Load & Lock Program in Memory. . . . . . . . . . . 30 DEF OBJECT Define Object. . . . . . . . . . . . . . . . . . . . . . 70
AUTO Automatic Line Generation. . . . . . . . . . . . . . . . . 31 DEF systab= Define System Tables . . . . . . . . . . . . . . 73
BEGIN Reset Files and Variables . . . . . . . . . . . . . . . . . . 32 DEF sysvar= Define System Variables . . . . . . . . . . . 75
BREAK Immediate Exit of Loop . . . . . . . . . . . . . . . . . . . 33 DEFAULT Branch If No Matching Case. . . . . . . . . . . . 76
BUTTON Control Button. . . . . . . . . . . . . . . . . . . . . . . . . 34 DEFCTL Define/Redefine CTL Values . . . . . . . . . . . . . 77
BYE Terminate ProvideX Session . . . . . . . . . . . . . . . . . . 39 DEFPRT Define as Printer . . . . . . . . . . . . . . . . . . . . . . . 80
CALL Transfer to Subprogram. . . . . . . . . . . . . . . . . . . . . 40 DEFTTY Define Terminal Size . . . . . . . . . . . . . . . . . . . . 81
CASE Define Branch Points . . . . . . . . . . . . . . . . . . . . . . 42 DELETE Remove Lines from Program . . . . . . . . . . . . . 82
CHART Control Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 DELETE OBJECT Remove Windows Object. . . . . . . . 83
CHECK_BOX Control Check Box. . . . . . . . . . . . . . . . . . 47 DICTIONARY Data Dictionary Access . . . . . . . . . . . . 84
CLEAR Reset Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . 53 DIM Define Arrays and Strings . . . . . . . . . . . . . . . . . . 85
CLIP_BOARD Use Windows Clipboard . . . . . . . . . . . . 54 DIRECT Create File with Keyed Access . . . . . . . . . . . . 88
CLOSE Close File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 DIRECTORY Create Subdirectory. . . . . . . . . . . . . . . . . 90
CONTINUE Initiates Next Iteration of Loop . . . . . . . . 56 DISABLE Disable Use of Prefix Table Entry. . . . . . . . 91
CREATE TABLE Create Keyed File (EFF). . . . . . . . . . . 57 DISABLE CONTROL Disable Control . . . . . . . . . . . . . 92
CUSTOM_VBX Create/Control VBX . . . . . . . . . . . . . . 60 DISABLE EVENT Internal Event Disable. . . . . . . . . . 93
CWDIR Change Working Directory . . . . . . . . . . . . . . . 61 DROP Removes Program from Memory . . . . . . . . . . . 94
DATA Define Data Elements. . . . . . . . . . . . . . . . . . . . . . 62 DROP_BOX Control Drop Box . . . . . . . . . . . . . . . . . . . 95
DAY_FORMAT Specify DAY Format . . . . . . . . . . . . . . 63 DROP CLASS Delete Class Definition . . . . . . . . . . . 101
DEF CLASS Define Object Class . . . . . . . . . . . . . . . . . . 64 DROP INDEX Drop Key from Keyed File . . . . . . . . . 102
DROP OBJECT Delete Object . . . . . . . . . . . . . . . . . . . 103 LINE_SWITCH Redirect Console Input/Output . . . .175
DROP..ON Drag and Drop . . . . . . . . . . . . . . . . . . . . . . 104 LIST List Program Statements. . . . . . . . . . . . . . . . . . . .176
DUMP Display Variables. . . . . . . . . . . . . . . . . . . . . . . . 105 LIST_BOX Control List Box. . . . . . . . . . . . . . . . . . . . . .178
EDIT Edit Line in Program . . . . . . . . . . . . . . . . . . . . . . 107 LOAD Read Program into Memory . . . . . . . . . . . . . . .194
ENABLE Re-Enable Use of Prefix Table Entry . . . . . 109 LOAD CLASS Pre-Load Class Definition . . . . . . . . . .195
ENABLE CONTROL Enable Control. . . . . . . . . . . . . . 110 LOAD DATA Load Program Constants. . . . . . . . . . . .196
ENABLE EVENT Internal Event Enable . . . . . . . . . . 111 LOCAL Designation of Local Data . . . . . . . . . . . . . . . .197
END Halt Program Execution . . . . . . . . . . . . . . . . . . . 112 LOCK Reserve File for Exclusive Use. . . . . . . . . . . . . .200
END DEF End Definition of Multi-line Function . . 113 LONG_FORM Use Long Variable Names. . . . . . . . . .201
END SWITCH End Branching of a Program. . . . . . . 114 MENU_BAR Control Menu Bar. . . . . . . . . . . . . . . . . .202
END WITH End Branching of a Program . . . . . . . . . 115 MERGE Read/Append Lines from File . . . . . . . . . . . .206
END_IF End IF Directive. . . . . . . . . . . . . . . . . . . . . . . . 116 MESSAGE_LIB Establish Message Library . . . . . . . .208
ENDTRACE End Trace Output . . . . . . . . . . . . . . . . . . 117 MNEMONIC Define File Command Sequence . . . . .210
ENTER Specify Arguments . . . . . . . . . . . . . . . . . . . . . . 118 MSGBOX Display PopUp Message Box. . . . . . . . . . .212
ERASE Delete File/Directory from System. . . . . . . . . 119 MULTI_LINE Control Multi-Line Input . . . . . . . . . . .214
ERROR_HANDLER Define Generic Handler . . . . . . 120 MULTI_MEDIA Control Multimedia Interface . . . . .222
ESCAPE Interrupt Program Execution . . . . . . . . . . . 121 NEXT End FOR Loop . . . . . . . . . . . . . . . . . . . . . . . . . . .224
EXECUTE Execute Basic Instruction . . . . . . . . . . . . . 122 NEXT RECORD End SELECT Statement . . . . . . . . .225
EXIT Terminate Subprogram and Return . . . . . . . . . . 123 OBTAIN Get Hidden Terminal Input. . . . . . . . . . . . . .226
EXITTO End Loop, Transfer Control . . . . . . . . . . . . . . 124 ON EVENT Event Processing . . . . . . . . . . . . . . . . . . . .227
EXTRACT Read and Lock Data. . . . . . . . . . . . . . . . . . . 125 ON..GOSUB Conditional Subroutine Execution . . .229
EXTRACT RECORD Read-Lock Data Record . . . . . . 127 ON..GOTO Conditional Transfer of Control . . . . . . .230
FILE Create New File from File Descriptor. . . . . . . . . 129 OPEN Open for Processing . . . . . . . . . . . . . . . . . . . . . .231
FIND Locate and Read Data . . . . . . . . . . . . . . . . . . . . . 130 PASSWORD Apply Password & Encryption. . . . . . .238
FIND RECORD Locate & Read Data Record. . . . . . . 131 PERFORM Call Subprogram, Share Variables. . . . . .242
FLOATING POINT Switch to Scientific Notation . . 132 POP Premature Exit from Stack . . . . . . . . . . . . . . . . . .244
FOR..NEXT Loop While Incrementing . . . . . . . . . . . . 133 POPUP_MENU Create Popup Menu . . . . . . . . . . . . .245
FUNCTION Declare Object Method . . . . . . . . . . . . . . 136 PRECISION Change Current Precision. . . . . . . . . . . .247
GET_FILE_BOX Ask for Filename . . . . . . . . . . . . . . . . 138 PREFIX Set File Search Rules . . . . . . . . . . . . . . . . . . . .248
GOSUB Execute Subroutine . . . . . . . . . . . . . . . . . . . . . 140 PREINPUT Place Data in Input Queue . . . . . . . . . . . .250
GOTO Transfer within Program . . . . . . . . . . . . . . . . . 141 PRINT Display Information . . . . . . . . . . . . . . . . . . . . . .251
GRID Control Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 PROCESS Call a NOMADS Panel . . . . . . . . . . . . . . .252
H_SCROLLBAR Control Horizontal Scrollbar . . . . . 152 PROCESS SERVER Establish Remote Server . . . . . .254
HIDE Hide Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 PROGRAM Create or Assign Program File . . . . . . . .255
IF..THEN..ELSE Test Condition . . . . . . . . . . . . . . . . . . 156 PROPERTY Declare Object Properties. . . . . . . . . . . . .257
INDEXED Create Indexed File . . . . . . . . . . . . . . . . . . . 158 PURGE Clear Data from a File . . . . . . . . . . . . . . . . . . .259
INPUT Get Input from Terminal . . . . . . . . . . . . . . . . . 159 QUIT Terminate ProvideX Session . . . . . . . . . . . . . . . .260
INSERT Insert New Record in File . . . . . . . . . . . . . . . 161 RADIO_BUTTON Control Radio Button . . . . . . . . . .261
INVOKE Execute Operating System Command . . . . 162 RANDOMIZE Set Random Key . . . . . . . . . . . . . . . . . .266
IOLIST Specify Variable List . . . . . . . . . . . . . . . . . . . . . 164 READ Read Data from File . . . . . . . . . . . . . . . . . . . . . .267
KEYED Create Single/Multi-Keyed File . . . . . . . . . . . 165 READ DATA Read Data from Program. . . . . . . . . . . .269
KEYED LOAD Load and Repair Keyed File . . . . . . . . 172 READ RECORD Read Record from File . . . . . . . . . . .271
LET Assign Value to Variable . . . . . . . . . . . . . . . . . . . . 173 REDIM Re-Dimension Array . . . . . . . . . . . . . . . . . . . .273
LIKE Inherit Properties. . . . . . . . . . . . . . . . . . . . . . . . . . 174 REFILE Clear Data from File . . . . . . . . . . . . . . . . . . . . .274
RELEASE Terminate ProvideX Session. . . . . . . . . . . . 275 SETESC Set Interrupt Processing. . . . . . . . . . . . . . . . .313
REM Remark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 SETFID Set FID( ) Definition . . . . . . . . . . . . . . . . . . . .316
REMOVE Delete Record from File. . . . . . . . . . . . . . . . 277 SETMOUSE Control/Set Mouse. . . . . . . . . . . . . . . . . .317
RENAME Change a File's Name . . . . . . . . . . . . . . . . . 278 SETTIME Set Local Time . . . . . . . . . . . . . . . . . . . . . . . .319
RENAME CLASS Change Name of Class . . . . . . . . . 279 SETTRACE Enable Program Tracing . . . . . . . . . . . . . .320
RENAME CONTROL Change CTL Values . . . . . . . . 280 SHORT_FORM Use Short Variable Names . . . . . . . .321
RENAME..INDEX Rename Keys in Keyed File. . . . . 281 SHOW Show Control . . . . . . . . . . . . . . . . . . . . . . . . . . .322
RENUMBER Change Program Line Numbers . . . . . 282 SORT Create File for Sorting. . . . . . . . . . . . . . . . . . . . .323
REPEAT..UNTIL Repetitive Execution . . . . . . . . . . . . 283 START Restart ProvideX . . . . . . . . . . . . . . . . . . . . . . . .324
RESET Reset Program State . . . . . . . . . . . . . . . . . . . . . 284 STATIC Add Local Properties at Runtime. . . . . . . . . .325
RESTORE Reset Program Data Position . . . . . . . . . . 285 STOP Halt Program Execution. . . . . . . . . . . . . . . . . . .326
RETRY Re-Execute Failing Instruction. . . . . . . . . . . . 286 SWITCH..CASE Branch Control . . . . . . . . . . . . . . . . .327
RETURN Subroutine/Function Return. . . . . . . . . . . . 287 SYSTEM_HELP Invoke Windows Help. . . . . . . . . . . .328
ROUND Control Rounding. . . . . . . . . . . . . . . . . . . . . . 289 SYSTEM_JRNL File System Journalization . . . . . . . .330
RUN Transfer and Execute a Program . . . . . . . . . . . . 290 TABLE Define Translation Table . . . . . . . . . . . . . . . . . .336
SAVE Write Program to File. . . . . . . . . . . . . . . . . . . . . 291 TRANSLATE Translate Contents of Variable . . . . . . .337
SAVE CONTROL Save Image of Control . . . . . . . . . . 292 TRISTATE_BOX Control Tristate Box . . . . . . . . . . . . .340
SAVE DATA Save Program Constants . . . . . . . . . . . . 293 UNLOCK Remove Exclusive Use from File. . . . . . . . .345
SAVE FILE Save Bitmap to Disk . . . . . . . . . . . . . . . . . 294 UNTIL End REPEAT Loop. . . . . . . . . . . . . . . . . . . . . . .346
SELECT..FROM..NEXT RECORD Query Records . 295 UPDATE Update Existing Record in File . . . . . . . . . .347
SERIAL Create a Sequential File. . . . . . . . . . . . . . . . . . 298 USER_LEX Define Alternate Keywords . . . . . . . . . . .348
SET_FOCUS Set Input Focus . . . . . . . . . . . . . . . . . . . . 300 VARDROP_BOX Control Variable Drop Box . . . . . .350
SET_NBF Set Number of Keyed I/O Buffers . . . . . . . 301 VARLIST_BOX Control Variable List Box . . . . . . . . .356
SET_PARAM Set System Parameters . . . . . . . . . . . . . 302 V_SCROLLBAR Control Vertical Scrollbar . . . . . . . .361
SETCTL GOSUB on CTL Event. . . . . . . . . . . . . . . . . . 303 VIA Assign Variable Indirectly . . . . . . . . . . . . . . . . . . .364
SETDAY Change Local Date . . . . . . . . . . . . . . . . . . . . . 304 VIDEO_PALETTE Control Video Colours. . . . . . . . . .366
SETDEV Set Device Type Name. . . . . . . . . . . . . . . . . . 305 WAIT Temporarily Halt Execution. . . . . . . . . . . . . . . .368
SETDEV IOL= Alter IOList for Open Channel . . . . 306 WAIT FOR EVENT Wait for Event . . . . . . . . . . . . . . .369
SETDEV KEY Alter Keys of Open Channel . . . . . . . . 307 WEND End WHILE Loop . . . . . . . . . . . . . . . . . . . . . . .370
SETDEV PROGRAM Set I/O Program . . . . . . . . . . . 308 WHILE..WEND Repeat Statements . . . . . . . . . . . . . . .371
SETDEV SEP= Change File SEP . . . . . . . . . . . . . . . . 309 WINPRT_SETUP Windows Printer Setup . . . . . . . . .372
SETDEV TSK( ) Add to TSK( ) List . . . . . . . . . . . . . . 310 WITH..END WITH Object Reference Construct . . . .378
SETDRIVE Change Default Drive . . . . . . . . . . . . . . . . 311 WRITE Add/Update Data in File . . . . . . . . . . . . . . . . .379
SETERR Set Error Transfer . . . . . . . . . . . . . . . . . . . . . . 312 WRITE RECORD Write Record . . . . . . . . . . . . . . . . . .382
3. System Functions
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 ASC( ) Get Internal Character Value. . . . . . . . . . . . . .392
@( ) Location Function . . . . . . . . . . . . . . . . . . . . . . . . . 386 ASN( ) Returns Arc-Sine Function . . . . . . . . . . . . . . .393
@X( ) / @Y( ) Convert X/Y Coordinates . . . . . . . . . 387 ATH( ) Convert Hex . . . . . . . . . . . . . . . . . . . . . . . . . . . .394
ABS( ) Absolute Value . . . . . . . . . . . . . . . . . . . . . . . . . . 388 ATN( ) Return Arc-Tangent . . . . . . . . . . . . . . . . . . . . .395
ACS( ) Return Arc-Cosine . . . . . . . . . . . . . . . . . . . . . . 389 BIN( ) Binary String from Numeric Value . . . . . . . . .396
AND( ) Logical AND . . . . . . . . . . . . . . . . . . . . . . . . . . 390 BSZ( ) Bank Memory Size . . . . . . . . . . . . . . . . . . . . . . .397
ARG( ) Command-Line Argument . . . . . . . . . . . . . . . 391 CHG( ) Notify if Variable Has Changed . . . . . . . . . . .398
CHR( ) ASCII Character of Value . . . . . . . . . . . . . . . . 399 KEY( ) Return Key of Next Record. . . . . . . . . . . . . . . .466
CMP( ) Compress Data . . . . . . . . . . . . . . . . . . . . . . . . . 400 KGN( ) Generate Record Key. . . . . . . . . . . . . . . . . . . . .467
COS( ) Return Cosine . . . . . . . . . . . . . . . . . . . . . . . . . . 402 LCS( ) Return Lowercase String. . . . . . . . . . . . . . . . . .468
CPL( ) Compile String . . . . . . . . . . . . . . . . . . . . . . . . . . 403 LEN( ) Return String Length . . . . . . . . . . . . . . . . . . . .469
CRC( ) Cyclic-Redundancy-Check. . . . . . . . . . . . . . . . 404 LNO( ) Return Line Number. . . . . . . . . . . . . . . . . . . . .470
CSE( ) Case Compare . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 LOG( ) Return Base 10 Logarithm . . . . . . . . . . . . . . . .471
CTL( ) Return CTL Definition . . . . . . . . . . . . . . . . . . . 406 LRC( ) Longitudinal-Redundancy Check . . . . . . . . . .472
CVS( ) Convert String . . . . . . . . . . . . . . . . . . . . . . . . . . 408 LST( ) Return List Form of Statement . . . . . . . . . . . . .473
DEC( ) Get Binary of String . . . . . . . . . . . . . . . . . . . . . 410 MAX( ) Return Maximum Value. . . . . . . . . . . . . . . . .474
DIM( ) Generate String/Get Array Size . . . . . . . . . . . 411 MEM( ) Return Memory Value . . . . . . . . . . . . . . . . . .475
DIR( ) Get Current Directory . . . . . . . . . . . . . . . . . . . . 413 MID( ) Return Substring. . . . . . . . . . . . . . . . . . . . . . . .476
DLL( ) Call Windows DLL . . . . . . . . . . . . . . . . . . . . . . 414 MIN( ) Return Minimum Value. . . . . . . . . . . . . . . . . .477
DSK( ) Get Current Disk Drive . . . . . . . . . . . . . . . . . . 417 MNM( ) Return Mnemonic Value . . . . . . . . . . . . . . . .478
DTE( ) Convert Date . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 MOD( ) Return Modulus . . . . . . . . . . . . . . . . . . . . . . .479
ENV( ) Get Environment Values . . . . . . . . . . . . . . . . . 420 MSG( ) Return Message Text . . . . . . . . . . . . . . . . . . . .480
EPT( ) Return Exponent Value. . . . . . . . . . . . . . . . . . . 422 MSK( ) Scan String for Mask . . . . . . . . . . . . . . . . . . . .482
ERR( ) Test Error Value . . . . . . . . . . . . . . . . . . . . . . . . . 423 MXC( ) / MXL( ) Return Maximum Column/Line .484
EVN( ) Evaluate Numeric Expression. . . . . . . . . . . . . 425 NEW( ) Create New Object . . . . . . . . . . . . . . . . . . . . . .485
EVS( ) Evaluate String Expression . . . . . . . . . . . . . . . 426 NOT( ) Invert String Bits/Logical Condition . . . . . . .486
EXP( ) Raise to Base Ten . . . . . . . . . . . . . . . . . . . . . . . . 427 NUL( ) Return Test for Null . . . . . . . . . . . . . . . . . . . . .487
FFN( ) Find File Number. . . . . . . . . . . . . . . . . . . . . . . . 428 NUM( ) Convert String to Value . . . . . . . . . . . . . . . . .488
FIB( ) Return File Information Block. . . . . . . . . . . . . . 430 OBJ( ) Return Object Information . . . . . . . . . . . . . . . .489
FID( ) Return File Information Descriptor. . . . . . . . . 434 OPT( ) Return File Open Options . . . . . . . . . . . . . . . .491
FIN( ) Return File Information. . . . . . . . . . . . . . . . . . . 437 PAD( ) Pad/Truncate String . . . . . . . . . . . . . . . . . . . . .492
FPT( ) Return Fractional Part . . . . . . . . . . . . . . . . . . . 441 PCK( ) Pack Numeric Data . . . . . . . . . . . . . . . . . . . . . .494
GAP( ) Return Odd Parity String. . . . . . . . . . . . . . . . 442 PFX( ) Return Prefix Value . . . . . . . . . . . . . . . . . . . . . .495
GBL( ) Reference Global String Variable . . . . . . . . . . 443 PGM( ) Return Program Line. . . . . . . . . . . . . . . . . . . .496
GEP( ) Return Even Parity String . . . . . . . . . . . . . . . 445 POS( ) Scan String . . . . . . . . . . . . . . . . . . . . . . . . . . . . .498
HSA( ) Highest Sector Available . . . . . . . . . . . . . . . . . 446 PRC( ) Round Number to Precision. . . . . . . . . . . . . . .499
HSH( ) Generate Modified Value . . . . . . . . . . . . . . . . . 447 PRM( ) Return Parameter Value . . . . . . . . . . . . . . . . .500
HTA( ) Get Hex Value of String . . . . . . . . . . . . . . . . . . 450 PTH( ) Return Pathname . . . . . . . . . . . . . . . . . . . . . . . .502
HWN( ) Highest Unused Window Number. . . . . . . . 451 PUB( ) List Public Programs. . . . . . . . . . . . . . . . . . . . .503
I3E( ) Convert to/from IEEE Format. . . . . . . . . . . . . . 452 RCD( ) Return Next Record . . . . . . . . . . . . . . . . . . . . .504
IND( ) Return Next Record Index . . . . . . . . . . . . . . . . 453 RDX( ) Convert ASCII to Radix-40 . . . . . . . . . . . . . . .505
INT( ) Return Integer Portion . . . . . . . . . . . . . . . . . . . 454 REC( ) Expand IOList Specification. . . . . . . . . . . . . . .506
IOL( ) Get IOList Specification. . . . . . . . . . . . . . . . . . . 455 REF( ) Control Reference Count . . . . . . . . . . . . . . . . . .508
IOR( ) Logical OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 RND( ) Return Random Number . . . . . . . . . . . . . . . . .509
JST( ) Justify String . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 RNO( ) Return Next Record Number . . . . . . . . . . . . .510
JUL( ) Return Julian Date . . . . . . . . . . . . . . . . . . . . . . . 459 SEP( ) Return Field Separator. . . . . . . . . . . . . . . . . . . .511
KEC( ) Return Key of Current Record . . . . . . . . . . . . 461 SGN( ) Return Sign of Value . . . . . . . . . . . . . . . . . . . .512
KEF( ) Return First Key of File. . . . . . . . . . . . . . . . . . . 462 SIN( ) Sine Function . . . . . . . . . . . . . . . . . . . . . . . . . . . .513
KEL( ) Return Last Key of File . . . . . . . . . . . . . . . . . . . 463 SQR( ) Square Root . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514
KEN( ) Return Key After Next. . . . . . . . . . . . . . . . . . . 464 SRT( ) Sort String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .515
KEP( ) Return Prior Record's Key. . . . . . . . . . . . . . . . 465 SSZ( ) Return Sector Size . . . . . . . . . . . . . . . . . . . . . . .517
STK( ) Program Call Stack . . . . . . . . . . . . . . . . . . . . . . 518 TSK( ) Returns Entry from Task List . . . . . . . . . . . . . .539
STP( ) Strip Leading/Trailing Characters. . . . . . . . . . 519 TXH( ) Text Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . .540
STR( ) Convert Numeric to String . . . . . . . . . . . . . . . 521 TXW( ) Text Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . .541
SUB( ) Substitute Text . . . . . . . . . . . . . . . . . . . . . . . . . . 523 UCS( ) Return Upper Case String . . . . . . . . . . . . . . . .542
SWP( ) Swap Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 UCP( ) UnCompress Data . . . . . . . . . . . . . . . . . . . . . . .543
SYS( ) Invoke Operating System Command . . . . . . . 525 UPK( ) Unpack Numeric Data . . . . . . . . . . . . . . . . . . .544
TAN( ) Return Tangent . . . . . . . . . . . . . . . . . . . . . . . . . 527 VIN( ) / VIS( ) Obtain Value of Variable. . . . . . . . . . .545
TBL( ) Convert String Via Table. . . . . . . . . . . . . . . . . . 528 XEQ( ) In-line Subprogram Execute . . . . . . . . . . . . . .547
TCB( ) Return Task Information . . . . . . . . . . . . . . . . . 530 XFA( ) Extended Field Attributes. . . . . . . . . . . . . . . . .548
TMR( ) Timer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 XOR( ) Logical Exclusive OR . . . . . . . . . . . . . . . . . . . .550
TRX( ) Convert Radix-40 to ASCII . . . . . . . . . . . . . . . 538
4. System Variables
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 MSL Length of String Matching Last MSK . . . . . . .563
BKG Background Process Status . . . . . . . . . . . . . . . . . 552 NAR Number of Arguments, Start ProvideX . . . . . .563
CHN Channels Open . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 NID Network or Network Node ID. . . . . . . . . . . . . . . .563
CTL Control Signal Code . . . . . . . . . . . . . . . . . . . . . . . . 553 PFX Current Prefix Setting . . . . . . . . . . . . . . . . . . . . . .564
DAY Return Current System Date . . . . . . . . . . . . . . . 553 PGN Current Program Pathname . . . . . . . . . . . . . . . .564
DLM Return System Directory Delimiter . . . . . . . . . 554 PRC Precision Currently In Effect . . . . . . . . . . . . . . . .565
DSZ Data Space Size Available to User . . . . . . . . . . . 555 PRM ProvideX Parameter Settings . . . . . . . . . . . . . . .566
EOM End of Message Character String . . . . . . . . . . . 555 PSZ Current Program Size. . . . . . . . . . . . . . . . . . . . . . .566
ERR Last System-Detected Error Value . . . . . . . . . . . 556 QUO ASCII Quote Character . . . . . . . . . . . . . . . . . . . .567
ERS Line Number of Last Error . . . . . . . . . . . . . . . . . . 556 RET Operating System's Last Error Code. . . . . . . . . .567
ESC ASCII ESCape Character . . . . . . . . . . . . . . . . . . . 557 RND Random Number Generator. . . . . . . . . . . . . . . . .567
GFN Highest Available Global Channel . . . . . . . . . . . 557 SEP ProvideX Field Delimiter. . . . . . . . . . . . . . . . . . . .568
GID Operating System Process Identifier. . . . . . . . . . 558 SID System Identification Code. . . . . . . . . . . . . . . . . . .568
HFN Highest Available Local Channel . . . . . . . . . . . . 558 SSN System Software Identifier . . . . . . . . . . . . . . . . . .568
HLP Last Specified HLP= Value. . . . . . . . . . . . . . . . . . 559 SYS Operating System Identification . . . . . . . . . . . . .569
HWD Starting/Home Directory . . . . . . . . . . . . . . . . . . 559 TIM Time in Hours Past Midnight . . . . . . . . . . . . . . .569
LFA Last File Number Accessed . . . . . . . . . . . . . . . . . . 559 TME Time in Hours Past Midnight . . . . . . . . . . . . . . .570
LFO Last File Number Opened . . . . . . . . . . . . . . . . . . . 560 TMS Seconds Expired in Current Minute . . . . . . . . .570
LIP Input Location: Column, Line . . . . . . . . . . . . . . . . 560 TSM Error Status of Current Program . . . . . . . . . . . .571
LPG Lead Program Name . . . . . . . . . . . . . . . . . . . . . . . 560 UID Current UserID . . . . . . . . . . . . . . . . . . . . . . . . . . . .571
LWD Current Working Directory . . . . . . . . . . . . . . . . 561 UNT Lowest Available Local Channel . . . . . . . . . . . . .572
MSE Mouse State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 WHO Current UserID . . . . . . . . . . . . . . . . . . . . . . . . . .572
5. Mnemonics
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 '2D' Use 2D Controls . . . . . . . . . . . . . . . . . . . . . . . . . . .581
Dynamic Information in Mnemonics . . . . . . . . 576 '3D' Use 3D Controls . . . . . . . . . . . . . . . . . . . . . . . . . . .582
Mnemonic Categories . . . . . . . . . . . . . . . . . . . . . . . 577 '4D' Use 4D Controls . . . . . . . . . . . . . . . . . . . . . . . . . . .582
List of Mnemonics . . . . . . . . . . . . . . . . . . . . . . . . . . 581 'AB' Abort (For Windows Spooler) . . . . . . . . . . . . . . . .582
'@@' Define Cursor Position Sequence . . . . . . . . . . . 581 'ARC' Define/Draw Arc . . . . . . . . . . . . . . . . . . . . . . . . .582
'+$' & '-$' For Internal Use Only . . . . . . . . . . . . . . . 581 'AT' Character Attribute Output Sequence . . . . . . . . .583
'+B' & '-B' Output Buffering On/Off . . . . . . . . . . . . . 583 '+E' & '-E' Multi-line Enter as Tab. . . . . . . . . . . . . . . .599
'Bn' Background Colour . . . . . . . . . . . . . . . . . . . . . . . . . 584 'EB' End Blinking Mode (DOS) . . . . . . . . . . . . . . . . . .599
'BACKGR' or 'BK' Next Colour Is Background . . . . 584 'EE' End Echo Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . .599
'BB' Begin Blinking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584 'EF' End Expanded Print. . . . . . . . . . . . . . . . . . . . . . . . .599
'BE' Begin Echoing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 'EG' End Generating Error #29 . . . . . . . . . . . . . . . . . . .599
'BEEP' Simple Sound Effect . . . . . . . . . . . . . . . . . . . . . . 585 'EI' End Input Transparency . . . . . . . . . . . . . . . . . . . . .600
'BG' Begin Generating Error #29 . . . . . . . . . . . . . . . . . 585 'EJ' End Box Joining . . . . . . . . . . . . . . . . . . . . . . . . . . . .600
'BI' Begin Input Transparency. . . . . . . . . . . . . . . . . . . . 586 'EL' Start Edit Key Load . . . . . . . . . . . . . . . . . . . . . . . . .600
'BJ' Join Box Intersections . . . . . . . . . . . . . . . . . . . . . . . 586 'EL' End VFU Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . .600
'BK' Next Colour Is Background. . . . . . . . . . . . . . . . . . 586 'EM' End Output Markup Mode. . . . . . . . . . . . . . . . . .601
'BLACK' & '_BLACK' Colour Text . . . . . . . . . . . . . . . . 587 'EO' End Output Transparency . . . . . . . . . . . . . . . . . . .601
'BLUE' & '_BLUE' Colour Text . . . . . . . . . . . . . . . . . . . 587 'EP' Start Expanded Print. . . . . . . . . . . . . . . . . . . . . . . .601
'BM' Begin Output of Markup Files . . . . . . . . . . . . . . 587 'ER' End Reverse Video . . . . . . . . . . . . . . . . . . . . . . . . . .601
'BO' Begin Output Transparency . . . . . . . . . . . . . . . . . 587 'ES' Send Escape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .602
'BOX' Define / Draw a Box . . . . . . . . . . . . . . . . . . . . . . 588 'ET' End Type Ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . .602
'BR' Begin Reverse Video . . . . . . . . . . . . . . . . . . . . . . . . 588 'EU' End Underscoring . . . . . . . . . . . . . . . . . . . . . . . . . .602
'BS' Cursor Back One Space . . . . . . . . . . . . . . . . . . . . . 588 'EW' End WrapAround . . . . . . . . . . . . . . . . . . . . . . . . . .602
'BT' Begin Type-Ahead Mode. . . . . . . . . . . . . . . . . . . . . 589 '+F' & '-F' Signal Change of Focus On/Off. . . . . . . . .602
'BU' Begin Underscoring . . . . . . . . . . . . . . . . . . . . . . . . 589 'Fn' Foreground Colour . . . . . . . . . . . . . . . . . . . . . . . . . .603
'BW' Begin WrapAround . . . . . . . . . . . . . . . . . . . . . . . . 589 'FF' Form Feed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .603
'BX' Define / Draw a Box . . . . . . . . . . . . . . . . . . . . . . . . 589 'FILL' Define Fill Style. . . . . . . . . . . . . . . . . . . . . . . . . . .603
'*C' Automatic Output on CLOSE . . . . . . . . . . . . . . . 590 'FL' Start Function Key Load . . . . . . . . . . . . . . . . . . . . .604
'Cn' Control Cursor Display Mode . . . . . . . . . . . . . . . 590 'FONT' Define / List Fonts . . . . . . . . . . . . . . . . . . . . . . .605
'CAPTION' Replace Caption for Window . . . . . . . . . . 590 'FRAME' Define / Draw a Frame . . . . . . . . . . . . . . . . .606
'CE' Clear from Cursor to End of Screen . . . . . . . . . . . 591 'GD' Define Graphics Character Set . . . . . . . . . . . . . . .607
'CF' Clear Foreground Mode . . . . . . . . . . . . . . . . . . . . . 591 'GE' End Graphics Data . . . . . . . . . . . . . . . . . . . . . . . . .607
'CH' Position Cursor at Home . . . . . . . . . . . . . . . . . . . 591 'GF' Default Font for Window Objects. . . . . . . . . . . . .608
'CI' Clear Input Type-Ahead Buffer . . . . . . . . . . . . . . . 591 'GOTO' or 'WG' Make Window Current . . . . . . . . . .608
'CIRCLE' Define / Draw a Circle. . . . . . . . . . . . . . . . . . 592 'GREEN' & '_GREEN' Colour Text. . . . . . . . . . . . . . . .608
'CL' Clear from Cursor to End of Line . . . . . . . . . . . . . 592 'GS' Start Graphics Data Transmission . . . . . . . . . . . .609
'COLOUR' & '_COLOUR' User-Defined Colours . . . 592 '*H' Control Screen Colours . . . . . . . . . . . . . . . . . . . . . .609
'CP' Condense Print for Screen . . . . . . . . . . . . . . . . . . . 593 'HIDE' Control Window Display. . . . . . . . . . . . . . . . . .610
'CPI' Logical Characters per Inch . . . . . . . . . . . . . . . . . 593 '*I' Input Conversion Table . . . . . . . . . . . . . . . . . . . . . .610
'CR' Carriage Return. . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 '+I' & '-I' Implied Decimals On/Off . . . . . . . . . . . . . .610
'CS' Clear Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 'IC' Insert a Space at Cursor. . . . . . . . . . . . . . . . . . . . . .610
'CURSOR' Control Cursor, Mouse Pointer. . . . . . . . . 594 'IMAGE' Define a Graphics Group . . . . . . . . . . . . . . . .611
'CYAN' & '_CYAN' Colour Text . . . . . . . . . . . . . . . . . . 595 'JC' Justify Centre. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .612
'+D' & '-D' Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 'JD' Justify Decimal-Aligned . . . . . . . . . . . . . . . . . . . . .612
'DC' Delete Character at Cursor . . . . . . . . . . . . . . . . . . 595 'JL' Left-Justify Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . .612
'DEFAULT' or 'DF' Define Default . . . . . . . . . . . . . . . . 596 'JN' Right-Justify for Numeric. . . . . . . . . . . . . . . . . . . .612
'DIALOGUE' Define/Draw Dialogue Region . . . . . . . 596 'JR' Right-Justify Text . . . . . . . . . . . . . . . . . . . . . . . . . . .612
'DN' Move Cursor Down a Line . . . . . . . . . . . . . . . . . . 598 'JS' Left-Justify String . . . . . . . . . . . . . . . . . . . . . . . . . . .612
'DO' Delete Objects in Scroll Region . . . . . . . . . . . . . . 598 'L6' Set to 6 LPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .613
'DROP' or 'WD' Drop Identified Window . . . . . . . . . 598 'L8' Set to 8 LPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .613
6. System Parameters
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 'FE' Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .661
List of System Parameters . . . . . . . . . . . . . . . . . . . 651 'FF'= File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .662
'1U' Force Dedicated User Slot . . . . . . . . . . . . . . . . . . . 651 'FI' Ignore Format Mask Error. . . . . . . . . . . . . . . . . . . .662
'3D' 3D in Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651 'FL' Filename in Lower Case. . . . . . . . . . . . . . . . . . . . . .662
'AD' Auto-DIM Array . . . . . . . . . . . . . . . . . . . . . . . . . . 651 'FN' Filename As-Is: No Case Conversion. . . . . . . . . .663
'AH' Alternative 'WINDOW'/'BOX' Heading. . . . . 652 'FO'= Format Overflow Character . . . . . . . . . . . . . . . .663
'AI'= Automatic Line-Number Increment . . . . . . . . . 652 'FP' Floating Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .663
'AP' Auto-Enable PDF Output. . . . . . . . . . . . . . . . . . . 652 'FS'= Default Field Separator . . . . . . . . . . . . . . . . . . . .663
'AW' Alternate WINPRT_SETUP. . . . . . . . . . . . . . . . . 652 'FT' Trapping the F10 Key. . . . . . . . . . . . . . . . . . . . . . . .664
'B0' Base Zero for Level / Window . . . . . . . . . . . . . . . . 652 'FU' Filename in Upper Case . . . . . . . . . . . . . . . . . . . . .664
'BF'= Common File Buffers. . . . . . . . . . . . . . . . . . . . . . 653 'FX' Force EXTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . .664
'BL'= Break Lines in Listings . . . . . . . . . . . . . . . . . . . . 653 'HC' Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .664
'BT' Binary Test: 1st Read . . . . . . . . . . . . . . . . . . . . . . . 653 'HP' LibHaru *PDF* . . . . . . . . . . . . . . . . . . . . . . . . . . . .665
'BX' BBx Emulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 'I0' Ignore Null Substring (No Error 47) . . . . . . . . . .665
'BY'= Base year . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 'I2' Ignore Max. Record Count (No Error 2) . . . . . . .665
'CD' Check Current Directory. . . . . . . . . . . . . . . . . . . . 654 'IC' Ignore Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .665
'CE' Obsolete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 'IM' Insert Mode for Input . . . . . . . . . . . . . . . . . . . . . . .665
'CF' Bypass Console Flush . . . . . . . . . . . . . . . . . . . . . . . 654 'IR' Insert Mode Reset (Decimal Point) . . . . . . . . . . . .666
'CH'= Hover Colour . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 'IS'= CTL for Input Ending on SIZ=. . . . . . . . . . . . . .666
'CI' Cache IOList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 'IW' Terminate Invoke Wait . . . . . . . . . . . . . . . . . . . . . .666
'CO'= Mouse Over Colour . . . . . . . . . . . . . . . . . . . . . . 655 'IZ'= Ignore Max. Memory Setting . . . . . . . . . . . . . . .666
'CS' Coloured Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 'JC' Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .666
'CT'= Character Time-out . . . . . . . . . . . . . . . . . . . . . . . 656 'KF'= Keyed File Format. . . . . . . . . . . . . . . . . . . . . . . . .667
'CU'= Currency Symbol. . . . . . . . . . . . . . . . . . . . . . . . . 656 'KR' Keyed File I/O Emulates BBx . . . . . . . . . . . . . . . .667
'D0' Divide by Zero. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 'LB'= Colour for Line # in Break Points . . . . . . . . . . .667
'DB'= Dynamic File Buffers . . . . . . . . . . . . . . . . . . . . . 656 'LC' List Variables in Lower Case . . . . . . . . . . . . . . . . .667
'DC' Destructive Cursor. . . . . . . . . . . . . . . . . . . . . . . . . 657 'LD' List Directives in Lower Case . . . . . . . . . . . . . . . .668
'DD' Convert Directory Delimiter . . . . . . . . . . . . . . . . 657 'LE' SAVE / LIST Indent Statements . . . . . . . . . . . . . .668
'DF'= Enforced Delay Time after 'FF'. . . . . . . . . . . . . 657 'LF' Long Form Variables . . . . . . . . . . . . . . . . . . . . . . . .668
'DL'= Enforced Delay Time after 'LF'. . . . . . . . . . . . . 658 'LM' List, Show Matched Strings . . . . . . . . . . . . . . . . .668
'DP'= Decimal Point Symbol . . . . . . . . . . . . . . . . . . . . 658 'LP' Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .668
'DT'= Device Time-out. . . . . . . . . . . . . . . . . . . . . . . . . . 658 'LS'= Colour for Line with Syntax Error . . . . . . . . . .669
'DW'= Delay Time after 'WI'. . . . . . . . . . . . . . . . . . . . 659 'LU' Lock Unnecessary: Serial Files. . . . . . . . . . . . . . . .669
'EG' End Generation of Error #29 . . . . . . . . . . . . . . . . 659 'LW' For Internal Use Only . . . . . . . . . . . . . . . . . . . . . .669
'EL'= Encryption Level . . . . . . . . . . . . . . . . . . . . . . . . . 659 'LZ' Suppress Leading Zeros. . . . . . . . . . . . . . . . . . . . . .669
'EO' Embedded 'EO' Mnemonics . . . . . . . . . . . . . . . . . 660 'MB'= MegaBytes: File Segment Size . . . . . . . . . . . . .670
'ES' Display OS Errors in Command Mode . . . . . . . . 660 'MC' Maintain Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . .670
'EX' Apply Execute at Level 0 . . . . . . . . . . . . . . . . . . . . 660 'MF'= Multi-Line Size Factor . . . . . . . . . . . . . . . . . . . .671
'F,' Suppress Commas on Numeric Overflow . . . . . . 661 'MP' Returns Positive Modulus Value. . . . . . . . . . . . .671
'F4' Return CTL=4 for Exit . . . . . . . . . . . . . . . . . . . . . . 661 'MS'= Memory for Program Swap. . . . . . . . . . . . . . . .671
'FB'= Dedicated File Buffers . . . . . . . . . . . . . . . . . . . . . 661 'MX' User-Defined Message Box. . . . . . . . . . . . . . . . . .671
'FC' Force File Commit . . . . . . . . . . . . . . . . . . . . . . . . . . 661 'NE' Subprogram Error Report . . . . . . . . . . . . . . . . . . .672
'NI' Ignore Blanks in Numeric Fields. . . . . . . . . . . . . . 672 'SL'= Save Command Lines . . . . . . . . . . . . . . . . . . . . . .683
'NK' Null Key Stripping. . . . . . . . . . . . . . . . . . . . . . . . . 672 'SP' Set Printer Default. . . . . . . . . . . . . . . . . . . . . . . . . .683
'NL' Suppress LET Directive in Listings. . . . . . . . . . . 672 'SR' Small Reads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .683
'NN' No Line Numbers as References . . . . . . . . . . . . . 672 'SS' Check Structure on Save . . . . . . . . . . . . . . . . . . . . .684
'NR' No Intermediate Rounding on Division . . . . . . . 672 'SV'= Generate for Older Version. . . . . . . . . . . . . . . . .684
'NS' No Swapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 'SW'= Scroll Wheel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .684
'NX' Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 'SZ'= Maximum Memory Size for Session . . . . . . . . .684
'OC' Commit Prior to OPEN Directive. . . . . . . . . . . . 673 'TA'= Turbo Mode Acknowledgement . . . . . . . . . . . . .685
'OF'= Maximum Size Before Output Flush. . . . . . . . 673 'TB' Toolbar Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .685
'OL'= Maximum Buffers for OPEN LOAD . . . . . . . 673 'TC'= Tip Colour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .685
'OM' Old Style Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 'TH'= Thousands Separator . . . . . . . . . . . . . . . . . . . . . .686
'OP' Return Original Program Name . . . . . . . . . . . . . 674 'TL' LIKE Emulates Thoroughbred . . . . . . . . . . . . . . . .686
'OR' Full OS Path for Rename . . . . . . . . . . . . . . . . . . . 674 'TN' Strip Trailing Nulls. . . . . . . . . . . . . . . . . . . . . . . . .686
'OW'= Owner Application Code . . . . . . . . . . . . . . . . . 674 'TT'= Timed Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .687
'PC'= Program Load Caching . . . . . . . . . . . . . . . . . . . . 674 'TU' Thin-Client Turbo Mode. . . . . . . . . . . . . . . . . . . . .687
'PD'= Default Precision for Current Session. . . . . . . 675 'TX' Default String-Template Field Separator. . . . . . .687
'PE' Password Error Control . . . . . . . . . . . . . . . . . . . . . 675 'UL' Un-Numbered Line Assignment. . . . . . . . . . . . . .688
'PF' EMS Page Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 'UM' Upper Memory Blocks. . . . . . . . . . . . . . . . . . . . . .688
'PL'= Program Libraries. . . . . . . . . . . . . . . . . . . . . . . . . 675 'VC' VT100 Cursor Mode Line Wrap. . . . . . . . . . . . . .688
'PO' Path Original. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 'VM' Direct Memory Addressing . . . . . . . . . . . . . . . . .688
'PP' Prompt for Password. . . . . . . . . . . . . . . . . . . . . . . . 676 'VP'= Variable Pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . .688
'PQ' Password Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 'VR'= Verify Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .689
'PS'= Maximum Program Size (KB). . . . . . . . . . . . . . 677 'VW'= Verify Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . .689
'PT' Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 'WB' WindX BREAK Recognition . . . . . . . . . . . . . . . .689
'PU' Upper-Case Prefix. . . . . . . . . . . . . . . . . . . . . . . . . . 677 'WD'= Defer File Writes . . . . . . . . . . . . . . . . . . . . . . . .690
'PW'= Password Character for Multi-Line . . . . . . . . 677 'WF' Force Windows Screen Update. . . . . . . . . . . . . . .690
'PZ' Suppress Program Size Warning . . . . . . . . . . . . . 677 'WH'= Delay Retry: Locking File Headers . . . . . . . . .690
'Q_'= Lowest Task Priority . . . . . . . . . . . . . . . . . . . . . . 678 'WI'= Windows Instruction Count . . . . . . . . . . . . . . .690
'Q^'= Highest Task Priority . . . . . . . . . . . . . . . . . . . . 678 'WK' Keep Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . .691
'QD'= Windows Queue Display . . . . . . . . . . . . . . . . . 678 'WL' Use Write Locks. . . . . . . . . . . . . . . . . . . . . . . . . . . .691
'QF'= Task Priority Factor. . . . . . . . . . . . . . . . . . . . . . . 679 'WP' Wait for Pipe on Close . . . . . . . . . . . . . . . . . . . . . .691
'QK' Quick Key Lookup . . . . . . . . . . . . . . . . . . . . . . . . . 679 'WT'= Number of Retries . . . . . . . . . . . . . . . . . . . . . . . .691
'QS' START, Not Initialized . . . . . . . . . . . . . . . . . . . . . 679 'WZ'= WindX ZLib Compression. . . . . . . . . . . . . . . . .692
'QT' No Prompt in Command Mode . . . . . . . . . . . . . . 679 'XC' WindX Continues After TCP Error. . . . . . . . . . .692
'RI' Round Multi-Line Inputs . . . . . . . . . . . . . . . . . . . . 679 'XF' Extended File Channels. . . . . . . . . . . . . . . . . . . . . .692
'RN'= Rounding Control . . . . . . . . . . . . . . . . . . . . . . . . 680 'XI' Extract Ignore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .692
'RP' Raw Print for *WINDEV*. . . . . . . . . . . . . . . . . . . 680 'XL' Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .692
'RR' Reset on RUN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680 'XS'= Extended Memory (KB) . . . . . . . . . . . . . . . . . . .693
'RS' Round STR( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680 'XT' ProvideX Exits to OS . . . . . . . . . . . . . . . . . . . . . . .693
'SB' Self-Block Extracts . . . . . . . . . . . . . . . . . . . . . . . . . 682 'ZP' Accept Zero-Length Programs. . . . . . . . . . . . . . . .693
'SC' Show Cursor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682 '!9' Sage MAS 90 Date Format . . . . . . . . . . . . . . . . . . .693
'SD' Subdirectory Slash . . . . . . . . . . . . . . . . . . . . . . . . . 682 '!B'= Set Break Character. . . . . . . . . . . . . . . . . . . . . . . .693
'SF' Short Form Variables. . . . . . . . . . . . . . . . . . . . . . . . 682 '!D' Numeric Separators: Legacy Mode . . . . . . . . . . . .694
'SK' Shrink Keyed Files. . . . . . . . . . . . . . . . . . . . . . . . . . 683 '!F' Obsolete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .694
'!I' NOMADS Input Queue . . . . . . . . . . . . . . . . . . . . . 694 '!U'= For Internal Use Only . . . . . . . . . . . . . . . . . . . . .695
'!K' Descending Key Logic (Legacy). . . . . . . . . . . . . . . 694 '!V' I’m a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .695
'!Q'= ODBC SQL Display . . . . . . . . . . . . . . . . . . . . . . 694 '!W' WindX Keyboard Synchronization . . . . . . . . . . .695
'!R'= For Internal Use Only . . . . . . . . . . . . . . . . . . . . . 694 '!X' I/O Crossover. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .696
'!S' Suppress Error Flags on Serial Save. . . . . . . . . . . 695 '*K' Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .696
'!T' 'DP' or Decimal for Numerics. . . . . . . . . . . . . . . . 695 '*L' Obsolete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .696
A. Appendix
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
Input/Output and Control Options . . . . . . . . 804
Data Format Masks . . . . . . . . . . . . . . . . . . . . . . . . . 807
Labels/Logical Statement References . . . . . . . 810
Negative CTL Definitions . . . . . . . . . . . . . . . . . . . . 811
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
Apostrophe Operator . . . . . . . . . . . . . . . . . . . . . . . 817
System Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821
Error Codes and Messages . . . . . . . . . . . . . . . . . . 822
List of Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837
The ProvideX Language Reference describes all features of the ProvideX programming
language: directives, functions, system variables, mnemonics, parameters, specialty files,
reserved words and system limitations. Although this volume is intended primarily for
programmers and analysts, and describes the language in precise detail, it does not try to
explain how to design and implement applications that can be written in ProvideX.
For product licensing and installation, refer to the ProvideX Installation Guide. For a
comprehensive look at the ProvideX environment, it's uses, and the details required to
develop applications, refer to the ProvideX User's Guide. Other ProvideX products (i.e.,
NOMADS, WindX, JavX, the ODBC Driver, the WebServer, and the Application Server) are
fully documented in separate publications. Rather than reproduce existing material,
references to these publications are supplied where applicable.
UsingthisDocumenta ion
This documentation is designed for both viewing and printing via Acrobat® Reader.
Click Help > Reader Guide on the menu bar to learn how to display, copy, search,
and print PDF documentation. While there are several ways to navigate the contents
of a PDF-based document, the following methods are highly effective, and are
consistent with other documentation distributed by ProvideX:
Bookmarks
The list of bookmarks, displayed on the left side of the Acrobat window, serves as a
hyperlinked table of contents. Bookmarks are displayed in a hierarchy where subordinate
headings appear indented below main headings. When subordinates are hidden or
collapsed, a plus sign (in Windows) or triangle (in Mac OS) will appear next to the main
heading. Simply click on the plus sign or triangle to display all collapsed headings.
Cross-References
Blue hyperlinks appear throughout this document wherever one section cross-references
another. They also appear in the form of hyperlists; such as the Table of Contents, the
Index, and the linked tables placed at the beginning of some chapters.
NavigationTips
The mouse pointer looks like an index finger when it is positioned over a linked
cross-reference — simply click to activate the link. For example, "Using this
Documentation" is hyperlinked back to the beginning of this section.
PDF Navigation Tips: The chapter name at the top left corner of the page head can be
used as a hyperlink to the beginning of the chapter. Use the page-up/down/back/
forward buttons to move one page at a time. Use the Back button to
jump to the previous view.
Conventions
Conventions
BMK
The following syntax items are used in this documentation to illustrate the format of
program statements in ProvideX.
stmtref Statement reference. This can be either the line label or line number of a
statement in the current program. Line numbers must be in the range of 0
to 64999.
If your given line number does not exist, ProvideX goes to the statement
with the next higher line number. For example, if line 1000 doesn't exist
and 1010 is the next line number, then for GOTO 1000 ProvideX will go to
1010 and proceed with execution from there.
Exception: ProvideX verifies the existence of an IOList and stmtref for
IOL=stmtref. It does not proceed to the next higher statement number.
varlist List of comma-separated variables. Typically, a mix of string and/or
numeric variables is acceptable; e.g., DEPT,ITEM,DESC$... (See
individual directives for restrictions.)
Chapter Outlines
ChapterOutlines
BMK
Introduction
At the most elementary level, ProvideX is a system that executes computer instructions
written in the ProvideX language. The instructions may be entered one statement at a
time for immediate execution, or contained in a program for sequential execution.
ProvideX also comprises, in itself, all the tools and facilities necessary to design, develop,
and implement comprehensive multi-user applications – applications that are ready to
accommodate industry-standard technologies and a variety of host platforms. This system
is equipped with a suite of integrated development tools, automatic error correction,
rigorous security controls, transparent access to commercially-available databases, support
for the latest industry standards and protocols, and much more.
For Business Applications
Since the language is oriented towards integer math and values with two decimal
points (monetary values), ProvideX is probably best known for the development of
business-related products. It comes complete with a robust native data storage
system that can handle generous file sizes and various file types. While optimized
for small to mid-range businesses, ProvideX also has the capacity to manage large
multi-user banking, manufacturing, and hotel/hospitality applications.
Unique Implementation
Programs created in ProvideX must be executed on systems where ProvideX is
running. The fact that the development cycle and program execution occur within
the same environment presents some distinct advantages in functionality: platform
independence, unmediated debugging of source code, smaller program size, and the
implementation of Object-Oriented Programming techniques.
This added functionality does not compromise performance. Unlike other similar
languages, ProvideX uses a two-pass system that "pre-compiles" programs when
they are saved to disk so they execute much faster at runtime.
Product Options
ProvideX can be configured for multiple uses (depending on the license and the
platform), but every installation begins with the base system that includes:
• ProvideX. Language interpreter and application development environment.
• NOMADS. Toolset for developing GUI-based applications (MS Windows).
• COM/OCX/ActiveX, DDE, DLL, ZLIB, SSL, PDF, etc. Built-in support for a number
of industry-standard technologies.
Extend the functionality of the ProvideX base system with a set of tightly integrated
application development and deployment solutions:
• WindX, JavX, and UltraFX. Thin-clients for displaying and interacting with
GUI-based ProvideX applications running from a server.
• Application Server. Secure configurable hosting facility for connecting thin-client
implementations via MS Windows, UNIX/Linux, and MAC OS X.
• Local and Client/Server ODBC. Open DataBase Connectivity (ODBC) for external
access to ProvideX databases.
• Web Server. Interface for producing ProvideX-coded websites that allow browser
access to ProvideX and ODBC data sources.
• Internet Toolkit. Utilities for developing e-mail/web-enabled applications.
• RPC. Remote Processing Capability for distributed processing of ProvideX.
• XML Support. Implementation for parsing and serializing XML documents.
• OCI, DB2, MySQL, ODBC. Native external database support.
• Smart Controls. Auto-load capability for list boxes/grids.
• Customizer. Utility for customizing panels dynamically without changing source.
• Multiple Image Support. Extended support for a variety of image file types.
• Report Writer. Powerful interface for designing and generating reports (runtime
module included with base system).
• Views. End-user "viewing" of application data for simplified extraction and
reporting (runtime module included with base system).
• Charting Control. Control object for creating advanced chart illustrations.
• OLE Server. Interface allowing external applications to access ProvideX objects directly.
Note: These products may be sold as stand-alone add-on packages or as part of a
Professional or eCommerce bundle. Contact your local ProvideX dealer/distributor or
visit www.pvx.com for complete product information and licensing.
Basic Concepts
BasicConcepts
BMK
This section covers the structural concepts used throughout this manual. Some of the
terminology discussed will be familiar to programmers with experience in other
Business Basic languages. However, ProvideX has several unique properties. Before
you attempt to program in ProvideX, take some time to understand the different
aspects of the language.
For product licensing and installation, refer to the ProvideX Installation and
Configuration Guide. For a comprehensive look at the ProvideX environment, it's uses,
and the details required to develop applications, refer to the ProvideX User's Guide.
ProvideX Session
The ProvideX environment comprises a Command mode and an Execution mode. When in
Command mode, ProvideX will be waiting for a directive or statement to be entered.
Execution mode begins once a RUN or a CALL directive is used to execute a program.
By default, ProvideX initializes in Command mode; as indicated by the Command mode
prompt '->'.
Directives can be entered in Command mode. If a directive does not include a leading
line number, it is executed immediately; otherwise, the statement is used in the
construction of a program. When a statement is inserted into a program, the prompt
changes from '->' to '-:' to indicate that the program has been changed but not saved.
When ProvideX is in Execution mode, it receives and executes all the statements that
constitute a program. The program remains in Execution mode until completed (via the
STOP or END directive), an error occurs, or it is interrupted via a BREAK or ESCAPE
instruction. The ProvideX session can be terminated using BYE, QUIT, or RELEASE.
These concepts are discussed in further detail under Modes of Operation, p.13 in the
User’s Guide.
See Chapter 2. Directives, for the complete list of directives and the details of their
mandatory or optional parameters.
System Functions
A ProvideX system function consists of a three-character function name followed by
an open parenthesis, the parameter(s) for the function, an optional error transfer, and
finally a close parenthesis, e.g., AND(A$,B$,ERR=0300). The number and type of
parameters vary from function to function. All may include the ERR= option (even
those where an error is unlikely). System functions are listed and described in
Chapter 3. System Functions.
Mnemonics
Mnemonics are used to control output to terminals and printers. A mnemonic
instruction is enclosed in single quotation marks. Refer to Chapter 5. Mnemonics,
for an alphabetical listing of all ProvideX mnemonics, complete with formats and
descriptions. Refer to the MNEMONIC Directive, p.210 for more information.
Examples:
5000 PRINT @(5,5),'CL' ! Clears screen-line 5 to its end, starting at column 5
5150 OPEN (30) PRINTER$
5160 PRINT (30)'FF', ! Form-feed instruction to PRINTER$ on Channel 30
System Parameters
System parameters are normally used at start-up to define the system's operation under
ProvideX. For example, the 'BY' parameter is used to define the base year for the JUL( ) and
DTE( ) functions. Like mnemonics, system parameters are enclosed in single quotation
marks. Refer to Chapter 6. System Parameters, for an alphabetical listing of system
parameters, complete with formats and descriptions. For further information, refer to the
PRM( ) Function, p.500, and the PRM System Variable, p.566.
Graphical control objects can also be produced using the NOMADS toolset for
GUI-based application development. Refer to the ProvideX NOMADS Reference.
The attributes of a control object can be referenced and determined by the use of
property names (’Height, ’Font$, ’Text$, ’TextColour$, ...). The object itself is
defined by a numeric variable containing the CTL value associated with the control,
followed by an apostrophe and the property. Refer to Chapter 7. Control Object
Properties, for a description of the Apostrophe Operator, and to review all
properties listed in the Properties List.
Specialty Files
ProvideX supports the use of a series of specialty files. See Chapter 8. Special Files
and Devices for descriptions of the commands you can use with the following
special device files:
*BITMAP* Virtual Bitmap, p.732
*HTML* Print to HTML, p.734
*MEMORY* Create & Use Memory File, p.735
*PDF* PDF Print Interface, p.738
*VIEWER* Print Preview, p.746,
*WINDEV* Raw Print Mode, p.750,
*WINPRT* Windows Printing, p.754.
Access to a data file is controlled by the use of a channel or logical file number. The link
between data file and channel is established using the OPEN directive. All subsequent
input and output to the file uses the same channel, which cannot be reused until the
file is closed (via CLOSE, START, BEGIN, or by termination of the user session). The
directives listed below are used to create, delete, and rename data files:
CREATE TABLE Create Keyed File (EFF), p.57
DIRECT Create File with Keyed Access, p.88,
DIRECTORY Create Subdirectory, p.90
INDEXED Create Indexed File, p.158,
KEYED Create Single/Multi-Keyed File, p.165,
SERIAL Create a Sequential File, p.298,
SORT Create File for Sorting, p.323
RENAME Change a File's Name, p.278
ERASE Delete File/Directory from System, p.119
ADD INDEX Add Key to Keyed File, p.29
DROP INDEX Drop Key from Keyed File, p.102
RENAME..INDEX Rename Keys in Keyed File, p.281
The following directives are used for file input/output and access:
PRINT Display Information, p.251,
FIND Locate and Read Data, p.130
READ Read Data from File, p.267,
EXTRACT Read and Lock Data, p.125
REMOVE Delete Record from File, p.277,
PURGE Clear Data from a File, p.259
WRITE Add/Update Data in File, p.379
OPEN Open for Processing, p.231
CLOSE Close File, p.55
LOCK Reserve File for Exclusive Use, p.200
UNLOCK Remove Exclusive Use from File, p.345.
There are also several system functions for file processing:
FIB( ) Return File Information Block, p.430,
FID( ) Return File Information Descriptor, p.434,
FIN( ) Return File Information, p.437,
IND( ) Return Next Record Index, p.453,
KEC( ) Return Key of Current Record, p.461,
KEF( ) Return First Key of File, p.462,
KEL( ) Return Last Key of File, p.463,
KEN( ) Return Key After Next, p.464,
KEP( ) Return Prior Record's Key, p.465,
KEY( ) Return Key of Next Record, p.466,
KGN( ) Generate Record Key, p.467,
RCD( ) Return Next Record, p.504,
RNO( ) Return Next Record Number, p.510.
See File Handling, p.97 in the User’s Guide for further information.
Punctuation/Syntax
Punctuation/Syntax
BMK
Directives
ACCEPT DROP_BOX INVOKE PURGE SETDRIVE
ADD INDEX DROP CLASS IOLIST QUIT SETERR
ADDR DROP INDEX KEYED RADIO_BUTTON SETESC
AUTO DROP OBJECT KEYED LOAD RANDOMIZE SETFID
BEGIN DROP..ON LET READ SETMOUSE
BREAK DUMP LIKE READ DATA SETTIME
BUTTON EDIT LINE_SWITCH READ RECORD SETTRACE
BYE ENABLE LIST REDIM SHORT_FORM
CALL ENABLE CONTROL LIST_BOX REFILE SHOW
CASE ENABLE EVENT LOAD RELEASE SORT
CHART END LOAD CLASS REM START
CHECK_BOX END DEF LOAD DATA REMOVE STATIC
CLEAR END SWITCH LOCAL RENAME STOP
CLIP_BOARD END WITH LOCK RENAME CLASS SWITCH..
CLOSE END_IF LONG_FORM RENAME CONTROL SYSTEM_HELP
CONTINUE ENDTRACE MENU_BAR RENAME..INDEX SYSTEM_JRNL
CREATE TABLE ENTER MERGE RENUMBER TABLE
CWDIR ERASE MESSAGE_LIB REPEAT.. TRANSLATE
DATA ERROR_HANDLER MNEMONIC RESET TRISTATE_BOX
DAY_FORMAT ESCAPE MSGBOX RESTORE UNLOCK
DEF CLASS EXECUTE MULTI_LINE RETRY UNTIL
DEF GID/UID EXIT MULTI_MEDIA RETURN UPDATE
DEF FN EXITTO NEXT ROUND USER_LEX
DEF MSG EXTRACT NEXT RECORD RUN VARDROP_BOX
DEF OBJECT EXTRACT RECORD OBTAIN SAVE VARLIST_BOX
DEF systab= FILE ON EVENT SAVE CONTROL V_SCROLLBAR
DEF sysvar= FIND ON ... GOSUB SAVE DATA VIA
DEFAULT FIND RECORD ON ... GOTO SAVE FILE VIDEO_PALETTE
DEFCTL FLOATING POINT OPEN SELECT.. WAIT
DEFPRT FOR.. PASSWORD SERIAL WAIT FOR EVENT
DEFTTY FUNCTION PERFORM SET_FOCUS WEND
DELETE GET_FILE_BOX POP SET_NBF WHILE..
DELETE OBJECT GOSUB POPUP_MENU SET_PARAM WINPRT_SETUP
DICTIONARY GOTO PRECISION SETCTL WITH
DIM GRID PREFIX SETDAY WRITE
DIRECT H_SCROLLBAR PREINPUT SETDEV WRITE RECORD
DIRECTORY HIDE PRINT SETDEV IOL=
DISABLE IF.. THEN.. ELSE.. PROCESS SETDEV KEY
DISABLE CONTROL INDEXED PROCESS SERVER SETDEV PROGRAM
DISABLE EVENT INPUT PROGRAM SETDEV SEP=
DROP INSERT PROPERTY SETDEV TSK( )
Overview
Overview BMK
This chapter provides an alphabetically arranged list of all ProvideX directives. Each
definition includes the correct syntax (showing associated parameters), values
returned, a general description, examples, and sometimes a cross reference to related
material. The list begins on the following page.
Format ACCEPT(chan[,fileopt])char$
Where:
chan Channel or logical file number.
char$ String variable. Receives the input character.
fileopt Supported file options (see also, File Options, p.804):
ERR=stmtref On error , transfer to program line number/label.
NUL=stmtref On no input, transfer to program line number/label.
TIM=num Maximum time-out value in integer seconds.
Description Use the ACCEPT directive to read a single keystroke (character) from a terminal. The
ACCEPT directive doesn't echo the keystroke/character to the terminal. If no input is
in the input buffer, the ACCEPT directive waits for terminal input. Control transfers
to the stmtref if you include a NUL= option and the terminal input buffer has no
data in it.
Example The following example reads one record at a time and displays it on the terminal.
When any key is pressed, control drops to line 130 (ending the listing of the file).
Description The ADD INDEX directive allows keys to be added to a ProvideX Keyed file without
having to rebuild the file. When adding keys to the file:
• ProvideX builds keys on-the-fly.
• Exclusive access to the file is required.
• Keys are assigned the next available key number.
• When adding a unique alternate key, the add generates an error and the key is not
defined if duplicate keys are in the desired index.
• Only one key can be added at any one time (ADD or DROP cannot execute at the
same time and will fail with an error zero).
• The key names are case insensitive (key will be converted to uppercase characters).
• The first character of the key name cannot be a "#" as this is reserved for access to
the keys by key number.
• If a key name is specified, it cannot be null; e.g., "".
• Spaces are valid and significant. A name of " " (space) is valid, and is not the same
as a key of " " (space space).
Note: A total key length that exceeds 240 characters will result in Error #80:
Invalid key definition.
See also DROP INDEX Drop Key from Keyed File, p.102
RENAME..INDEX Rename Keys in Keyed File, p.281
Description The ADDR directive loads the specified program into memory and keeps it there
until you unload it.
For as long as the ADDR-loaded program is in memory, that specific program will be
referenced (using its absolute path) even if you change the system PREFIX or current
directory after executing the ADDR directive. That is, all subsequent references to
any program whose name matches that string will still refer to the ADDR-loaded
program.
You can see this in the example below. When the program is executed, ProvideX
ADDR-loads "DATECHK", changes directories and executes the ADDR-loaded
program even though there is a different current directory and a different program
with the same name might exist in that directory.
To unload a program which is ADDR-loaded, either use the DROP directive or
execute the START directive.
Description Use the AUTO directive to have ProvideX automatically generate line numbers to
prefix your statement input.
If you omit the starting line number in this directive, then ProvideX uses either the
last generated line number (if any), or the next higher line in the current program. If
you do not specify an increment, the default is 10. If you change the increment in
Command mode, it stays at the new setting until you change it again.
The AUTO function remains active until you enter a null line (e.g., press Enter ) or
execute a command. You can backspace over and change the generated line number.
1. Closes all local files currently open (global files are not affected).
2. Closes all open windows (unless the 'WK' parameter is set), drops non-global
control objects, and resets the menu bar.
3. Clears local variables (global variables are not affected).
a) All if no varlist appears on directive.
b) Only those in varlist if no EXCEPT clause given.
c) All but those in varlist if EXCEPT clause present.
Refer to the examples provided below.
4. Resets PRECISION to the default ('PD'=2) or value set via the 'PD'= System
Parameter, p.675.
5. Sets ERR, RET, and CTL to zero.
6. Clears the stack for FOR..NEXT, WHILE..WEND, GOSUB..RETURN, etc.
7. Resets pointer to the first DATA item in the program.
Note: When executed within an object (in Object Oriented Programming), the BEGIN
directive will clear all of the object's properties, along with standard variables, and will
close any standard local files and files owned by the object.
Format BREAK
Description Use the BREAK directive to perform an immediate exit from a loop or case structure.
Execution resumes following the directive that would normally have ended the loop
or case structure (e.g., NEXT, or WEND). The *BREAK label emulates a BREAK
directive for use as a statement reference.
Note: You can now use BREAK commands in SELECT structures. In earlier version of
ProvideX, BREAK and the corresponding *BREAK label were not supported for use
with SELECT..NEXT RECORD directives.
Description Use the BUTTON directive to create/control a button object on the screen or to place an
icon in the Taskbar Notification Icon (see User’s Guide, p.197). The ctl_id is used to
generate a CTL whenever the button is pressed. If ctl_id is prefixed by an asterisk *, the
button is considered global, and not tied to a specific window. By default, non-global
buttons are deleted when a window is removed/dropped or when the application
issues a BEGIN. Global buttons can be removed manually or cleared by a START.
BUTTON contents$
The contents$ string expression defines the text or picture to appear on the button.
In the text, you can use an ampersand "&" preceding a character to identify it as a
hot key the user can press in conjunction with the Alt key to activate the button
from the keyboard.
Images and Icons
When adding an image to a button, enclose the image name in curly braces. Use a
leading exclamation point (!) to identify the image as internal, or specify the relative
path and filename to access an image file that is external. There are no icons in the
ProvideX executable and ProvideX does not support retrieving icons from either
resource libraries or other system DLLs /executables. For more information on the
options available for displaying internal/external images and the recognized image file
types, see Handling Images and Icons in the User’s Guide, p.398.
When you use text as well as images, the relative positions of the image and the text
set their relative placement. The following are example contents$ expressions:
"{!Add}Add" ! Displays the {!Add} bitmap in front of the text "Add"
"Delete{!Del}" ! Displays the {!Del} bitmap after the text "Delete"
If the string expression includes two images separated by a vertical bar inside a
single set of curly braces, the first is displayed when the button is released (normal
state), the second when the button is pressed; e.g., "{!Stop|C:\MYBMP\Go}.
You can also use the OPT="B" clause for a Bitmap Button to display different images
for different states. See BUTTON OPT= Settings, p.34.
Button Properties
The Apostrophe Operator can be used with the unique logical identifier (ctl_id) to
dynamically read and alter a wide variety of control attributes (properties) directly
from the programming language. The list of properties available for manipulating a
button object are described in Chapter 7. Control Object Properties.
Format 1: Define/Create
BUTTON [*]ctl_id,@(col,ln,wth,ht)=contents$[,ctrlopt]
Use this format to create a button control object, and give it a unique identifier in
ctl_id. The ctl_id is used to generate a CTL value whenever the user presses the
button; e.g.,
0010 REM Create button: CTL=4000 when pressed, 'Stop Sign' picture, "Exit" text
0020 BUTTON 4000,@(2,14,12,2)="{!Stop}Exit"
If the ctl_id has a leading asterisk *, the button is considered global (not tied to a
specific window); e.g.,
0010 REM To add a global button to the Toolbar with the text "Help":
0020 BUTTON *1000,@(0,-1,10,1)="Help"
Note: A button object can be created using a ctl_id of 0 zero for applications that need
to emulate the Enter key in the absence of an actual keyboard; i.e., touchscreen format.
Format 2: Remove
BUTTON REMOVE [*]ctl_id[,ERR=stmtref]
Use BUTTON REMOVE to delete a button; e.g., to remove the button created
previously,
0030 BUTTON REMOVE 4000
By default, non-global buttons are deleted when a window is removed/dropped or
when the application issues a BEGIN. Global buttons can be removed using BUTTON
REMOVE syntax, or cleared using the START directive.
Format 3: Disable/Enable
BUTTON {DISABLE | ENABLE} [*]ctl_id[,ERR=stmtref]
Use the BUTTON DISABLE format to gray out a button so that it will be visible but
inaccessible to users. To reactivate it, use BUTTON ENABLE.
0030 BUTTON DISABLE 4000
...
0500 BUTTON ENABLE 4000
Format 4: Hide/Show
BUTTON {HIDE | SHOW} [*]ctl_id[,ERR=stmtref]
Use the BUTTON HIDE format to hide the display of an active button. (The user can't
see or use the button when it's hidden. Use the BUTTON SHOW format to restore the
button's display and access.
Format BYE
Description Use the BYE directive to end a ProvideX session and return to the operating system.
If the ERR system variable has a value other than zero (i.e., an error has occurred)
then the operating system is informed that an error has occurred within ProvideX.
This allows you to do external testing of error conditions.
The ProvideX compiler converts the BYE directive into a QUIT directive. When you
use it in a compound statement, the BYE directive must be the final directive.
Description Use the CALL directive to transfer control to a subprogram. The current program state is
saved and the specified subprogram is loaded and executed. If you use arguments, they
are recieved in the called subprogram via the ENTER directive.
The called program should terminate with an EXIT, which may be replaced by an END
or STOP.
Warning: If you pass an argument to the subprogram using a simple variable (e.g.,
A$,Z) then any changes to the variable in the subprogram will have an effect in the
calling program. Subscripted variables/expressions (including substrings) or any
values enclosed in parentheses only have their values passed one way: to the
subprogram. Changes made to these will not affect the calling program.
You can protect a simple variable in a CALL or ENTER statement by placing it inside
parentheses. This turns the variable into an expression, which has the effect of
making it read only; e.g., CALL "PROG",(A$).
CALL "PROG",IOL=8000
Description Use the CASE directive to list possible branch points in a program.
Description Use the CHART directive to create two and three dimensional chart illustrations in a
graphical application. The chart type and visual look information is determined by
the FMT= option (several chart types are available). Chart values can have impact on
the resolution ability of the chart; e.g., it cannot reliably produce pie slices that are
thinner than 0.1 percent of the total pie chart value range.
Note: This feature requires ProvideX Charting Control activation. Refer to the
ProvideX website for licensing information.
Chart Properties
The Apostrophe Operator can be used with the unique logical identifier (ctl_id) to
dynamically read and alter a wide variety of control attributes (properties) directly
from the programming language. The list of properties available for manipulating a
chart object are described in Chapter 7. Control Object Properties.
Format 1: Define/Create
CHART ctl_id,@(col,ln,wth,ht),[,ctrlopt]
Use this format to create the chart. The value in ctl_id is a unique identifier that is
used to generate a CTL value whenever the chart is selected and changed.
Format 2: Remove
CHART REMOVE ctl_id[,ERR=stmtref]
Use this format to delete an entire chart.
Format 3: Disable/Enable
CHART {DISABLE | ENABLE} ctl_id[,ERR=stmtref]
If the mouse is clicked on a chart while it is enabled, then the program receives a CTL
event based on the ctl_id of the chart. This does not occur when the chart is disabled.
Format 4: Hide/Show
CHART {HIDE | SHOW} ctl_id[,ERR=stmtref]
With the CHART HIDE format, the chart remains active, but is not displayed. It is still
accessible to program(s). Use the CHART SHOW to restore the user's display and access.
Combined options can be used to create several different check box types. The "f", "T",
and "U" options provide the ability to turn check boxes into hotspots, which allows for
clickable areas on bitmaps or hyperlinked text in dialogues; e.g.,
"VTf" Creates a general hotspot.
"VUTf" Creates an HTML-like hotspot (e.g., URL hyperlink).
"F^" Creates a word-style toolbar with drop list
Description Use the CHECK_BOX directive to create/control a check box object on the screen or to
place an icon in the Taskbar Notification Icon (see User’s Guide, p.197). The user
can toggle check boxes between two states: ON to check the option or OFF to uncheck
it. (If you need a third check box state, refer to the TRISTATE_BOX Directive, p.340.)
CHECK_BOX contents$
The contents$ string expression defines the text or picture to appear on the check
box. In the text, you can use an ampersand "&" preceding a character to identify it as
a hot key the user can press in conjunction with the Alt key to activate the check
box from the keyboard. By default, the text is displayed to the right of a check box.
Add a colon ( : ) to the end of the text field to force the text to display to the left side.
Using Images
When adding an image to a check box, enclose the image name in curly braces. Use a
leading exclamation point (!) to identify the image as internal, or specify the relative
path and filename to access an image file that is external. There are no icons in the
ProvideX executable and ProvideX does not support retrieving icons from either
resource libraries or other system DLLs /executables. For more information on the
options available for displaying internal/external images and the recognized image file
types, see Handling Images and Icons in the User’s Guide, p.398.
When you use text as well as images, the relative positions of the image and the text
set their relative placement. The following are example contents$ expressions:
"{!Add}Add" ! Displays the {!Add} bitmap in front of the text "Add"
"Delete{!Del}" ! Displays the {!Del} bitmap after the text "Delete"
If you enclose two images separated by a pipe | vertical bar in a single set of curly
braces, the first will be displayed when the CHECK_BOX state is 0 (zero for
OFF/normal state), the second when the CHECK_BOX state is 1 (ON); e.g.,
"{!Stop|C:\MYBMP\Go}"
You can also use the OPT="B" clause for a Bitmap Button to display different images
for different states.
Format 1: Define/Create
CHECK_BOX [*]ctl_id,@(col,ln,wth,ht)=contents$[,ctrlopt]
Use this format to create a check box. The ctl_id is a unique value that is used to
generate a CTL value whenever the user toggles the box; e.g.,
0010 REM Create check box, CTL=100, Text="Post Month End", ALT-P to select box
0020 CHECK_BOX 100,@(60,20,20,2)="&Post Month End"
If the ctl_id has a leading asterisk *, the check box is considered global (not tied to a
specific window).
Format 2: Remove
CHECK_BOX REMOVE [*]ctl_id[,ERR=stmtref]
Use the CHECK_BOX REMOVE format to delete a check box. Note that, by default, all
check boxes which are not global are deleted when a window is removed or
dropped, and on a BEGIN; e.g.,
0030 CHECK_BOX REMOVE *17000 ! Removes global check-box 17000
Global check boxes can be removed using the above syntax, or cleared using the
START directive.
Format 3: Disable/Enable
CHECK_BOX {DISABLE | ENABLE}[*]ctl_id[,ERR=stmtref]
Use the CHECK_BOX DISABLE format to gray out a check box so that it will be
visible but inaccessible to users. To reactivate it, use CHECK_BOX ENABLE; e.g.,
0030 CHECK_BOX ENABLE 100
Format 4: Hide/Show
CHECK_BOX {HIDE | SHOW} [*]ctl_id[,ERR=stmtref]
Use the CHECK_BOX HIDE format to keep a check box from being displayed. Use the
CHECK_BOX SHOW format to restore the display of a hidden check box.
Format 9: Update
CHECK_BOX WRITE [*]ctl_id,state$[,ERR=stmtref]
Use the CHECK_BOX WRITE format to update the check box's state; e.g.,
0100 ! WRITE C_BX
0110 LET ON_OFF$="0"
0130 CHECK_BOX WRITE C_BX,ON_OFF$
Where:
Description
Use the CLIP_BOARD directive to have ProvideX application read or write to the
Windows clipboard. Only text can be passed to/from the clipboard. You can read a
maximum of 32000 bytes using ProvideX to access the clipboard. The write limit
depends on the system.
ProvideX does not interpret the data in the clipboard. Because of this, carriage return
$0D$ and line feed $0A$ characters are present in multi-line clipboard data when it
is read. You should place these characters between the lines when writing to the
clipboard.
Description Use the CLOSE directive to close a given logical file number. The memory used for
buffers and control information is returned to the system. Once closed, the file
(channel) number can be reused for a different file.
Note: A CLOSE directive will delete a Memory file. See *MEMORY* Create & Use
Memory File, p.735. When you CLOSE (chan), ProvideX returns all memory that was
occupied by the Memory file to the system.
The ERR= branch will be taken should an error occur during the close. If the
application tries to close an unopened file, an error will only be generated if an
ERR= branch is provided. If an ERR= branch is not provided, the close is assumed to
have occurred previously and no error is generated.
Note: When executed within an object, CLOSE (*) will close any standard local files
and files owned by the object. See Object-Oriented ProvideX, p.347 in the User’s
Guide.
Format CONTINUE
Description Use the CONTINUE directive to go immediately to the next iteration of a loop (or
terminate the loop if it is the last iteration). The *CONTINUE label emulates a
CONTINUE directive for use as a statement reference.
If you do not specify size, the default is VLR with a maximum record size
of 256. The maximum block size for a VLR file is 31KB and the maximum
record size is 31000 bytes. Attempting to create a VLR file with a record size
more than 31000 bytes results in an FLR file with the requested record size.
fileopt Supported file options (see also, File Options, p.804):
BSZ=num Block size. Numeric expression (1 - 63).
ERR=stmtref Error transfer.
SEP=char$ Default field separator character. Hex or ASCII string value.
OPT=char$ Single character settings:
"C" - Compressed. Adds simple compression to record data.
"X" - Extended Record Size. Extends record sizes up to 2GB per record.
"0" - Create VLR/FLR files (default if 'KF'=0)
"1" - Create EFF Files with 2GB limit.
"2" - Create EFF Files without 2GB limit (supported platforms).
"Z" - Set ZLib Compression for VLR and EFF Files.
Note: OPT="2" generates Error #99: Feature not supported
on platforms that do not offer Large File Support (LFS). Using options
"Z" and "C" together will result in an Error #32.
Description Use the CREATE TABLE directive to create a file with one or more keys. If the first
field in the directive after the filename is a number, ProvideX creates an external file
key (i.e., an index to the file). If the first field in the directive is a key definition
enclosed in square brackets [ ], then ProvideX uses only internal key fields instead.
Note: By default, the CREATE TABLE directive will create Enhanced File Format (EFF)
files on platforms that support Large File System (LFS), 64-bit addressing; however,
by setting OPT="0" in the syntax, CREATE TABLE can also be used to create
variable-length record (VLR) data files or fixed-length record (FLR) formatted files. For
more information on VLR/FLR, refer to the KEYED Directive, p.165.
ProvideX considers the first key specified for an EFF file to be the primary key. Every
record must have a unique primary key. You can have duplicate secondary keys
from record to record. There is a maximum of 255 keys allowed on a file with a
maximum of 255 data components making up these 255 keys. For VLR/FLR files,
there is a maximum of 16 key fields allowed on a file with a maximum of 96 data
components making up the 16 keys. There is no limit (other that the maximum of 96
key components) to the number of fields that comprise a key. The initial
implementation of EFF (in Version 6) is limited to 96 keys and 96 segments.
If a given filename already exists, ProvideX returns Error #12: File does not
exist (or already exists).
Keys have the following limits:
• Maximum external key size is 127 bytes.
• Maximum internal or alternate key size is 240 bytes.
• Maximum segment size is 127 bytes.
Size of File in MB
Size of File in MB
Invoice Segment
Invoice Segment
Size of File in GB
Size of File in GB
Max Addressible
Max Addressible
Max Pages per
Pages
Pages
4 1,022 2,056,264 8,032 8 818 1,645,816 6,429 6
8 2,046 8,388,607 65,536 64 1,637 9,998,796 78,116 76
12 3,070 8,388,607 98,304 96 2,456 25,061,024 293,684 287
16 4,094 8,388,607 131,072 128 3,275 46,832,500 731,758 715
20 5,118 8,388,607 163,840 160 4,094 75,313,224 1,470,961 1,436
24 6,142 8,388,607 196,608 192 4,914 110,525,688 2,590,446 2,530
28 7,166 8,388,607 229,376 224 5,733 152,429,004 4,167,981 4,070
32 8,190 8,388,607 262,144 256 6,552 201,041,568 6,282,549 6,135
36 9,214 8,388,607 294,912 288 7,371 256,363,380 9,012,775 8,802
40 10,238 8,388,607 327,680 320 8,190 318,394,440 12,437,283 12,146
44 11,262 8,388,607 360,448 352 9,010 387,177,720 16,636,543 16,247
48 12,286 8,388,607 393,216 384 9,829 462,631,372 21,685,846 21,178
52 13,310 8,388,607 425,984 416 10,648 544,794,272 27,665,334 27,017
56 14,334 8,388,607 458,752 448 11,467 633,666,420 34,653,632 33,841
60 15,358 8,388,607 491,520 480 12,286 729,247,816 42,729,364 41,728
63 16,126 8,388,607 516,096 504 12,901 805,383,628 49,549,969 48,389
Description Use the CWDIR directive to change from the current working directory to a new one.
If the specified directory name does not exist, ProvideX returns an Error #12:
File does not exist (or already exists).
Description Use the DATA directive to define the values for the READ DATA directive. The values
to be read can include constants, variables, and/or expressions. You can use a
formatted IOList with a READ DATA statement. When ProvideX executes the READ
DATA directive, it evaluates each expression in order and places its value into the
corresponding variable(s) defined in the READ DATA directive.
RUN
1Dog
2Cat
3Pig
done
Description Use the DAY_FORMAT directive to change the format mask for the DAY variable. The
format string contains the new format for the DAY variable. Characters in the format
string control the following:
DD Insert current day
MM Insert current month
YY Insert current year (last two digits only)
YYYY Insert four digit year
AA Insert current year using 00-99 for 1900 through 1999, A0-A9 for 2000
through 2009, B0-B9 for 2010 through 2019, etc.
All other characters in the mask are returned as literals in the DAY variable. The
DAY_FORMAT stays in effect until a START directive is executed.
The DAY_FORMAT directive mask can contain the letters AA (e.g., "MM/DD/AA"). The
format AA indicates a packed two-character year field. ProvideX returns $A0$ for
the year 2000, $A1$ for 2001, $B0$ for 2010, etc. up to $Z9$ for the year 2269. This
format assists with conversion issues in legacy applications.
See Also DAY System Variable, p.553,
DTE( ) Function, p.418,
JUL( ) Function, p.459.
Examples
Example 1: Example 2:
0010 PRINT DAY 0010 LET X$="01/01/A0"
0020 DAY_FORMAT "YYYY MM/DD" 0020 DAY_FORMAT "MM/DD/AA"
0030 PRINT DAY 0030 PRINT JUL(X$)
->RUN 0040 PRINT DTE(10957:"%Y %Ml %D")
11/15/00 ->RUN
2000 11/15 10957
2000 January 1
Description DEF CLASS is a directive used in Object Oriented Programming (OOP) to declare
the start of a Class Definition. The DEF CLASS statement comprises a modular
construct that includes a series of OOP directives concluding with an END DEF
directive to mark the end of the class definition.
class$ specifies the class name that will refer to this type of object. Class names are
case-insensitive and forward/backward slashes are considered equivalent. Duplicate
names are not allowed within the system. An object declared as UNIQUE will have a
single instance created, and any subsequent attempt to create an instance returns the
same object identifier and increments the object reference count by one.
Optional initialization and/or cleanup routines can be placed under the default
ON_CREATE and ON_DELETE labels. You can override these labels via CREATE label
and DELETE label clauses in the class definition. Normally, object creation/deletion
logic is invoked when an object of this specific class is created/destroyed. That means,
if you have ON_CREATE logic for an object A and object B inherits it, then the
ON_CREATE for object A will not be executed on creation of object B. You can force
creation and/or deletion logic to be executed on inheritance by including the
keyword REQUIRED.
Class Definition
In order to use an object, you must first define its characteristics. Each object is
defined with a DEF CLASS statement. This basic construct is outlined below.
0010 DEF CLASS "class$" ...
0020 PROPERTY prop1, prop2, ...
0030 LOCAL prop1, prop2, ...
0040 FUNCTION method (param) "
0050 LIKE "otherclass"
0060 PROGRAM "interface_prog"
0070 PRECISION nnn
0080 END DEF
All properties are declared by the PROPERTY directive. Methods available for an
object are defined via the FUNCTION directive. For more information on ProvideX
OOP syntax, refer to the ProvideX User’s Guide, Chapter 11.
Description These directives allow you to override the effective UNIX/Linux user or group ID of
a session, if OS security allows it. If the value is *, the system reverts back to the
original effective user or group ID.
Note: Whether or not you can switch to a different user is governed by the operating
system. If the OS does not allow the change, an error will be returned.
Description Use the DEF FN directive to define single- or multi-line functions. These functions
are considered string or numeric depending on the type of variable used in the
function name.
In Execution mode, ProvideX skips past the function without executing it. ProvideX
resumes after the DEF FN directive, executing the rest of the code until it reaches the
statement that invokes FNname( )... whereupon it applies the defined function.
When FNX is invoked (as in PRINT FNX(3,4)), the values in the variable list are
assigned to the variables in the function definition.
Note: The variables in the function definition's argument list represent actual
variables in the program. Their values are subject to change every time the function is
invoked. Unless you define variables as LOCAL, changes to the variables in your
program will be permanent. In the example above, variables A and B in the program
are changed by FNX(3,4), because they aren't defined as LOCAL.
Description The DEF MSG directive allows you to change system messages on-the-fly. It can be
used to temporarily override values returned by the MSG( ) function for specific
message numbers. It also allows the creation of text-based message names.
Description The DEF OBJECT directive is used primarily to create a new instance of a specified
COM object by placing a reference to the object obj_name$ into the supplied
numeric variable obj_id. This is a feature of the ProvideX Event Handling Interface
and Component Object Model (COM). (This directive is also used for implementation
of the ProvideX *SYSTEM and *XML interfaces).
Object Name Contents
The DEF OBJECT obj_name$ string may contain one of the following:
* Asterisk displays all registered COM controls on system.
CLSID Hexadecimal class identifier for object in the format
{hhhhhhhh-hhhh-hhhh-hhhhhhhhhhhh}.
progID Programmatic identifier name; e.g., Word.Document.
[DESIGN]filename.XML Indicates that a previously saved OLE/ActiveX control
definition should be loaded from the specified .XML file.
[DCOM]server;name Indicates that the object is located on a remote system. server
parameter is optional, and can be specified either by name,
or by IP address. If not supplied then the object is considered
local. name parameter is the CLSID or progID for the object.
[FILE]x:\filename Indicates that the object should be created using the
specified file name. An example of this would be a
Microsoft Word document file.
[GLOBAL]name Indicates that a reference to an object exposed by the use of
PvxMakeGlobal should be obtained. The name parameter
is the name used to expose the object.
Finalize Method
A method of the object instance may be assigned to run upon release of the object. It
should not require any parameters to be passed to it. This purpose of this is to
simplify handling of an automation "server", such as a Word or Excel application,
that requires a Quit() method in order to shut down. This finalize method removes
the need for a Quit() (or similar method) to be called.
Examples Upon successful execution of the DEF OBJECT statement, ProvideX will place the
object reference into the supplied numeric variable. Some examples of the DEF
OBJECT statement include the following:
DEF OBJECT X, "*"
DEF OBJECT X, "Word.Application", ERR=*NEXT
DEF OBJECT X, @(1,1, 70, 20)="Word.Document"
DEF OBJECT X, "[dcom]MyServer;Shell.Explorer"
DEF OBJECT X, @(10, 2, 20, 10)="[file]c:\Documents and Settings\Default
User\My Documents\test.doc"
DEF OBJECT X, "VCF1.VCF1Ctrl.1;License=8041207972768742028669631967"
DEF OBJECT X, "[running or new]Excel.Application"
The DEF OBJECT statement can also be used to bind child objects, which are
returned as the result of either a property access or method call.
Description Use these DEF directives to define new system tables for Accent Conversion, Date,
Lowercase and Uppercase.
Description Use these DEF formats to define the contents of the specified system variable:
DEF CTL Numeric code (integer) that represents a signal of user input from the
keyboard or mouse.
DEF ERR Numeric value (integer) that indicates the last system-detected error.
DEF LFO Channel/file number of the last file opened.
DEF LFA Channel/file number of the last file or device accessed.
DEF EOM End-Of-Message character string that ended last input.
DEF RET Operating system's error code associated with the last operating call.
Description Use the DEFAULT directive to create branch points to handle situations where there is
no corresponding CASE. If a matching case is not found and the DEFAULT is found,
execution continues at this point.
Description Use the DEFCTL directive to define additional CTL values; however, the replacement
only occurs if the original CTL value is rejected. Use the DEFCTL WINDOW format to
maintain the definition for the current window only. If WINDOW+ is used, the
definition will cascade to lower level windows.
The normal setting for the TAB key is to return CTL = -1015.
Positive CTL values will be returned to the program. Negative CTL values have
special significance to ProvideX. (Refer to the list of Negative CTL Definitions, at
the end of this document.
Use this format of the DEFCTL directive to define alternate CTL values to be applied
whenever the specified CTL value is received. For example, the UP-ARROW key is
CTL=-1011. You can redefine it to return a CTL=3; e.g.,
To create such a hot key, define the control sequence that is generated by the key as a
negative CTL value in the range -10 through -999. Then create and save your hot
key program using the naming convention $CTL-num where num is the CTL value.
Remember in your hot key program not to disturb the environment (i.e., do not close
any files that are already open, but close any files you open in this program and
remove any windows you create).
For example, the keystroke Ctrl -A returns $01$, which is defined in MY_START_UP
program as a hot key:
ProvideX will call $CTL-500 whenever anyone hits the hot key Ctrl -A throughout
the current session.
During Conversions
When you convert BBx-style programs to ProvideX, it is sometimes necessary to
have function and edit keys return single-character values. To do this, set both the
'EL' and 'FL' mnemonics and then use DEFCTL to redefine the mapped values and
allow standard ProvideX functions to continue to operate. See also, 'EL' Mnemonic,
p.600, and the 'FL' Mnemonic, p.604.
Example The following example redefines function keys F5 through F8 to return a single hex
character ($F5$ through $F8$ respectively). It also maps some of the input edit keys
to single character codes.
Description Use the DEFPRT directive to specify that a given channel refers to a printer. You can
specify the default maximum lines and columns supported by the printer. If you do
not designate the file as a printer, ProvideX does not apply printer mnemonics, and
the values for the MXC( ) and MXL( ) functions are not set.
Note: The number of lines has an additional limit based on a maximum of 20000
characters per window (i.e., the maximum number of lines is 20000/col ).
Description Use the DEFTTY directive to designate that the channel refers to a terminal. You can
specify the default maximum lines and columns supported by the terminal. If you
do not designate the file as a terminal, Windows and other mnemonics will not be
supported.
Description Use the DELETE directive to delete a range of statements from the current program.
For example, DELETE SECT1,450 deletes from line label SECT1: to line 0450,
inclusive.
If you only include a starting statement reference, only that statement is deleted; e.g.,
DELETE 510 ! Deletes statement 0510
510 ! Is the same as DELETE 510
If you include both a starting reference and a comma, all statements from the
reference to the end of the program are deleted. If you include a comma and an
ending reference, statements from the start of the program up to and including the
ending reference are deleted; e.g.,
DELETE 260, ! Deletes statements from line 0260 to program end
DELETE ,890 ! Deletes from program start, up to and including line number 0890
If you omit statement references, the complete program is deleted from memory.
Examples ->LIST
0010 REM "TEST"
0020 PRINT "TEST"
0030 STOP
->DELETE
->LIST
No program is in memory, so ProvideX doesn't return a listing and will report errors
if you try to EDIT or SAVE.
Where:
com_id Numeric variable to receive a handle (memory pointer to the COM
object).
stmtref Program line number or label to transfer control to.
Note: An OCX / OLE / ActiveX object is automatically destroyed when the window
it was defined in is dropped.
Example:
0010 DEF OBJECT handle,@(2,2,70,16)="Shell.Explorer"
0020 errcode=handle'Navigate2("www.pvx.com")
0030 input *
0040 DELETE OBJECT handle
For information on the creation of an OCX (Object Component eXtension) object, see
DEF OBJECT Define Object, p.70.
Note: The DELETE OBJECT and DROP OBJECT directives can be used interchangeably
regardless of the object being dropped. For further information, refer to the DROP
OBJECT Directive, p.103
Restricted: Use of the DICTIONARY directive is reserved exclusively for Sage Software
Canada Ltd. Its use is beyond the scope of this document and its syntax has been
provided here only for the sake of completeness.
Description The DICTIONARY directive allows Sage Software Canada Ltd. to access and maintain
the internal ProvideX data dictionary portions of the ProvideX databases.
Description Use the DIM directive to define an array, to define a composite string or to initialize a
string. Refer to the DIM( ) Function, p.411, to read the total number, minimum number
and maximum number of elements in an array. See also System Limits, p.819.
Note: For numeric arrays you can use either parenthesis ( ) or square brackets [ ]
to define arrays or reference elements. For string arrays, use square brackets [ ] to
avoid confusion with substrings. All arrays have three subscripts. An array defined as
X$[4] has values 0:4 for subscript 1, 0:0 for subscript 2, and 0:0 for subscript 3.
However, specifying the unused subscripts is unnecessary.
The following example defines dimension one with 10 elements (1 through 10).
Dimensions 2 and 3 are 0:0:
DIM CATS[1:10] !
If a value is not given (or is null) then the string is initialized to spaces.
Combine this string initialization with the definition of string arrays (above) to
pre-initialize all the elements of a string array. For example, the DIM statement DIM
ACC_IDS$[10](6,"0") defines an array of 11 strings, each pre-initialized with 6 zeroes.
Description Use the DIRECT directive to create a Direct file with an external key field. ProvideX
considers a Direct file to be the same as a Keyed file with an external key. If you use a
filename that already exists, ProvideX returns an Error #12: File does not
exist (or already exists). The maximum size of the key to the file is
mandatory along with the filename. The file type can be controlled by setting the
'KF'= System Parameter, p.667.
You can limit the number of records by specifying a maximum (an integer other than
zero). If you do attempt to set a maximum, then attempt to exceed this value (e.g., on
a WRITE statement) an Error #2 is generated. You can use zero (0) to create a
dynamic file, limited by physical file size limits and the amount of available drive
space.
If you include the maximum data length, it must be long enough to hold the
combined length of all the data fields and field separators for each record written to
the file.
WindX supports the use of this directive via the [WDX] tag; e.g., DIRECT
"[WDX]somefile.ext"... See [WDX] Direct Action to Client Machine, p.795.
Description Use the DIRECTORY directive to create a directory in the operating system's file
structure.
WindX supports the use of this directive via the [WDX] tag; e.g., DIRECTORY
"[WDX]somefile.ext"... For more information, see [WDX] Direct Action to Client
Machine, p.795.
Description Use the DISABLE directive to notify ProvideX that you do not want to use a given
prefix table entry. This directive is used primarily in the conversion to or from old
Business Basic languages where you could disable a specific disk drive.
To re-enable the prefix use the ENABLE directive.
Note: This directive is included in ProvideX for compatibility with other languages.
Description Use the DISABLE CONTROL directive to notify ProvideX that you want the specified
control (button, check box, radio button, etc.) disabled. The bin_list$ expression will
support up to 30 controls (90 characters).
Description Use the DISABLE EVENT directive to disable the handling of various system events
within a ProvideX session. The generation and trapping of events requires that the
internal "*system.pvc" COM object be defined first.
Example 00010 DEF OBJECT PvxComID,"*system" ! Activate support for System Events
00020 ENABLE EVENT ON TIM=2 ! Activate timer event at two second
intervals
00030 ON EVENT "TimeOut" FROM PvxComID PREINPUT 99 ! Establish how to
handle the event
00031 c=0
00040 WHILE 1
00050 INPUT *
00060 IF CTL=99 \
THEN c++;
PRINT "Timeout ",c;
IF c>3 \
THEN BREAK
00070 WEND
00075 DISABLE EVENT ON TIM ! Deactivate timer event
00077 DROP OBJECT PvxComID
00080 END
Description Use the DROP directive to unload a program previously loaded into memory by the
ADDR directive. The memory used while the program was loaded is returned to the
system. ProvideX returns an Error #17: Invalid file type or contents if
you use a DROP statement for a program that is not currently loaded in memory.
Note: In Object Oriented Programming, DROP OBJECT can be used to delete an object and
DROP CLASS can be used to delete a class. See DELETE OBJECT and DELETE OBJECT for
more information.
Where:
@(col,ln, Position and size of the drop box region when expanded. Numeric
wth,ht) expressions. Column and line coordinates for top left corner, width in
number of columns and height in number of lines. (Note that drop
box height, when not expanded, is governed by the system and is
roughly 1.5 times the standard graphic font height.)
array_name$ Name of array to load into drop box. String variable followed by {ALL}.
ctl_id Unique logical identifier for the drop box (any integer -32000 to +32000).
Avoid integers that conflict with keyboard definitions (e.g., 4 cancels CTL=4
for the F4 key) or Negative CTL Definitions, p.811. Use this value with
the apostrophe operator to access various Drop Box Properties.
ctl_val CTL value to generate when the drop box gains focus.
Description Use the DROP_BOX directive to create and manipulate drop box control objects on
the screen. A drop box normally displays a single line on the screen with a
DOWN-ARROW on the right side. The user can select any element from a list of items you
assign to the drop box, but variable input is not allowed. That is, the user can only
select, not enter, values. To view the list, the user clicks on the DOWN-ARROW. When the
user selects a drop box item, the associated ctl_id is used to generate a CTL value.
Refer to VARDROP_BOX Control Variable Drop Box, p.350, if you need a drop box
that allows both variable input and selection from a list.
Because a drop box list is in drop down form, a drop box takes a smaller amount of space
on the screen than a comparable list box. In addition, ProvideX automatically supplies
vertical scrollbars if the number of elements overflows the drop-down box size. Combine
these features to optimize the screen design when display space is at a premium.
Format 1: Define/Create
DROP_BOX ctl_id,@(col,ln,wth,ht)[,ctrlopt]
Use this format to define or create a drop box and give it a unique identifier in ctl_id.
You can use the FNT= option to establish the font for it. If you omit the font option,
ProvideX uses the system default font. Use FNT="*" to set the font as standard text
mode fixed font.
The following example creates a drop box that generates a CTL=100 when any item
is selected from it. It is loaded with the items Cat, Dog, and Pig.
0010 DROP_BOX 100,@(2,14,12,6)
0020 DROP_BOX LOAD 100,"Cat/Dog/Pig/"
Format 2: Remove
DROP_BOX REMOVE ctl_id[,ERR=stmtref]
Use the DROP_BOX REMOVE format to delete a drop box.
Format 3: Disable/Enable
DROP_BOX {DISABLE | ENABLE}ctl_id[,ERR=stmtref]
Use DROP_BOX DISABLE to gray out a drop box so that it will be visible but
inaccessible, to users. To reactivate it, use DROP_BOX ENABLE.
Format 4: Hide/Show
DROP_BOX {HIDE | SHOW} ctl_id[,ERR=stmtref]
With the DROP_BOX HIDE format, the drop box remains active, but is not displayed.
It is still accessible programmatically. Use the DROP_BOX SHOW format to restore
the display and user access.
Note: This behavior can be altered by use of the '+N' & '-N' Mnemonics, p.619.
Description The DROP CLASS directive is used in Object Oriented Programming to delete a class
definition and all related information. Once a class definition is established, then it
may not be changed but it can be deleted and recreated using DROP CLASS.
Only class definitions that have no references to them may be deleted. This means
that no class can be deleted when:
• Any object exists which refers to this class.
• Any other class exists which refers to this class by its LIKE clause.
Any attempt to delete a class that has a reference to it will return an Error #50:
"Class in use or already defined".
All class definitions will be deleted when a START directive is issued. Either DROP
CLASS or DELETE CLASS can be used to delete a class definition.
Description The DROP INDEX directive drops keys from a ProvideX Keyed file without having to
rebuild the file. When dropping keys from a file:
• The key is removed from the data file and the space previously occupied by the
key table is made available for subsequent use within the file.
• Only one drop can be processed against a file at one time.
• Exclusive access to the file is required.
• The primary key is required and cannot be dropped.
Description The DROP OBJECT directive is used in Object Oriented Programming to delete an object.
Only objects whose reference count is 1 can be deleted. Once an object is destroyed,
its identifier may be re-assigned to another object; although, this is not
recommended.
Objects are destroyed when the application issues a START directive.
REF (READ obj_id) returns the current reference count value. All calls to REF( )
return the current reference count (or 0, if deleted).
Note: The DELETE OBJECT and DROP OBJECT directives can be used interchangeably
regardless of the object being dropped. For further information, refer to the DELETE
OBJECT Directive, p.83
Format 1. Define Drag & Drop: DROP source_ctl_id ON dest_ctl_id RETURN new_ctl_id
2. Remove Logic: DROP source_ctl_id ON dest_ctl_id REMOVE
3. Temporarily Disable: DROP source_ctl_id ON dest_ctl_id DISABLE
4. Re-Enable Drag & Drop: DROP source_ctl_id ON dest_ctl_id ENABLE
Where:
dest_ctl_id Unique numeric identifier for the destination control.
new_ctl_id The CTL signal that is generated when the drop occurs on the
destination object. Avoid integers that conflict with keyboard definitions
(e.g., 4 cancels CTL=4 for the F4 key) or special negative CTL values set
by the system. See Negative CTL Definitions, p.811.
source_ctl_id Unique numeric identifier for the source control.
Description The Drag and Drop feature allows for copying or moving of information from one
object to another object. The drop event is triggered when a mouse is used to select
information from the source object, drag the selection to another object, and deposit
the information at the new location. The application is responsible for adding the
information to the destination object and removing it from the source object.
The available Drag From or source controls are multi-lines and various types of list
boxes, drop boxes, and grids.
The available Drop On or destination controls are buttons, check boxes, drop boxes,
grids, multi-lines, list boxes, radio buttons, tristate boxes. The highlighting of items
on which the drop will occur is not supported in simple or formatted list boxes;
however, this is supported in list view, report view, and tree view objects.
Note: When using the DISABLE syntax, the cursor will still change indicating that the
drop is valid, however the signal indicating the drop took place is not generated.
Description Use the DUMP directive to get a listing of all variables/properties 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 that contain data.
Examples 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"+$190000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000$+"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"
Description Use the EDIT directive to change an existing statement in a program. ProvideX builds
a new statement based on the commands you use in the EDIT directive. The new
statement then replaces the existing one, unless you change the line number. (In the
latter case, the original statement remains in the program at the original line number,
and the new or resultant statement is added to the program at the new line number.)
If you do not include parameters following the statement reference, ProvideX
displays the specified line so that you can edit it directly using the keyboard.
Copy text from current statement to the new statement. Use the C option to scan
along the original statement from the cursor up to and including the given string,
copying the data to the new statement.
Replace text from current line in the new statement. Use the R option to append the
given string to the new statement while advancing over the corresponding number
of characters in the original statement.
Add text to the new statement. This option adds the given string to the new
statement.
After all options have been processed, any remaining portion of the original
statement is appended to the new statement.
After EDIT:
Where:
prefix Numeric value of the PREFIX to re-enable. Numeric expression.
stmtref Program line number or label to transfer control to.
Note: This directive is used primarily in the conversion to or from old Business Basic
languages where you could DISABLE and ENABLE a specific disk drive.
Description Use the ENABLE directive to notify ProvideX that you want a given prefix
reactivated. To disable a prefix use the DISABLE directive.
Description Use the ENABLE CONTROL directive to notify ProvideX to reactivate the specified
control (button, check box, etc.). To disable the control use the DISABLE CONTROL
directive.
Description Use the ENABLE EVENT directive to enable the handling of various system events
within a ProvideX session. The generation and trapping of events requires that the
internal "*system.pvc" COM object be defined first.
Example 00010 DEF OBJECT PvxComID,"*system" ! Activate support for System Events
00020 ENABLE EVENT ON TIM=2 ! Activate timer event at two second
intervals
00030 ON EVENT "TimeOut" FROM PvxComID PREINPUT 99 ! Establish how to
handle the event
00031 c=0
00040 WHILE 1
00050 INPUT *
00060 IF CTL=99 \
THEN c++;
PRINT "Timeout ",c;
IF c>3 \
THEN BREAK
00070 WEND
00075 DISABLE EVENT ON TIM ! Deactivate timer event
00077 DROP OBJECT PvxComID
00080 END
Format END
Description Use the END directive to halt the currently running program. If the current program
is a subprogram, then control is immediately passed back to the calling program.
Otherwise all open files are closed, a RESET operation is performed, and the next
location counter is set to the start of the program.
If an application is invoked directly by an operating system command that specifies
a lead program, then the END directive performs the function of a QUIT and
automatically returns the user to the operating system. If the application is RUN
from Command mode, ProvideX returns to Command mode.
When you use the END directive in a compound statement, it must be the final
directive. (Exception: A remark can follow the END directive.)
The *END label emulates an END directive for use as a statement reference. The END
directive is functionally identical to the STOP directive.
Description Use the END DEF directive to mark the end of a multi-line function or DEF CLASS
statement. In Execution mode, when ProvideX encounters a DEF FN directive for a
multi-line function, it skips forward until it encounters an END DEF directive. (That
is, control is transferred to the line or statement after the end definition.) If you use
an END DEF directive without a preceding DEF FN directive, ProvideX returns an
Error #45: Referenced statement invalid.
It is also used to mark the conclusion of Class Definition (DEF CLASS statement) in
Object Oriented Programming, p.22.
Description Use the END SWITCH directive to stop the branching that has been activated in an
application by a SWITCH directive.
Description Use the END WITH directive to signal the end of a WITH construct.
Note: For complete syntax, refer to WITH Object Reference Construct, p.378.
Formats 1. End IF Before Line Ends: IF expression THEN ... ELSE ... END_IF ...
2. End IF using FI: IF expression THEN ... ELSE ... FI ...
Where:
expression Condition to control processing.
... Directives, processing.
Description Use END_IF (or FI) to terminate an IF directive before the end of a statement or line.
When an END_IF directive follows an IF directive, execution resumes immediately
after the END_IF directive, regardless of whether the condition was found to be true
or false.
->BAL=1.98
->RUN
The customer has $ 1.98 credit available
Description Use the ENDTRACE directive to stop the tracing of program statements (activated by
a previous SETTRACE directive).
-:run
0010 SETTRACE
0020 DEFCTL -1011=3 ! Return CTL 3 on up arrow
0030 INPUT "Enter name:",N$
Enter name: ! User hit up arrow
0040 ON CTL GOTO 0050,0030,0030,0060,0060
0060 ENDTRACE ; PRINT "DONE"; END
DONE
Restrictions: You can only use this directive in called programs (subprograms).
Description Use ENTER in a called program to define the total number, relative positions and
types of variables it will receive. These are arguments passed to the subprogram via
the calling program's CALL statement.
The variables in the calling program's CALL statement must match those in the
subprogram ENTER statement exactly. That is, each argument in the CALL statement
must correspond by position and in type (numeric or string) to a variable in the
ENTER statement. Otherwise, ProvideX returns Error #36: ENTER parameters
don't match those of the CALL.
If the calling program is passing a complete numeric array, the name of the array
must be specified, followed by {ALL} in both the ENTER and CALL statements
(curly brackets are part of the syntax).
Where a CALL statement specifies a simple variable, all changes made to the variable
ENTERed in your subprogram will be reflected in the calling program when the
subprogram terminates. You can protect a simple variable in either the CALL or
ENTER statement by placing the argument inside parentheses –this turns the variable
into an expression, which has the effect of making it read only.
String templates cannot be passed if they are defined prior to the ENTER statement in
the called program.
Restrictions: A directory can only be deleted if it does not contain any files. ProvideX
is subject to OS rules for the deletion of files or directories. In some operating systems,
the ERASE directive is not accepted and will not delete the directory.
Description Use the ERASE directive to delete the file or directory you name. The disk space that
was used by the file or directory is returned to the system. If you erase a file, all data
in the file is lost.
WindX supports the use of this directive via the [WDX] tag; e.g., ERASE
"[WDX]somefile.ext"... For more information, see [WDX] Direct Action to
Client Machine, p.795.
Note: This directive does not apply to any file segments for a multi-segmented file.
See Also Creating, Deleting, and Renaming Data Files, User’s Guide.
Description When you use the ESCAPE directive in Execution mode, ProvideX suspends
execution of the current program, lists the current statement (the line number with
the ESCAPE directive), and returns you to Command mode. Use the RUN directive to
have the program resume where it left off.
Simplify the debugging process by placing ESCAPE statements strategically in your
program. When execution is suspended, you are returned to Command mode, where
you can evaluate execution and the values of variables, etc. (up to the line where you
placed the ESCAPE in your application).
If you use ESCAPE in Command mode, ProvideX lists the next statement to be processed,
if any. If you specify an error value, the ESCAPE directive will generate an error with that
specific error value. Use this to provide an error exit in a multi-line function.
The *ESCAPE label emulates an ESCAPE directive for use as a statement reference.
Note: The 'XT' system parameter is automatically reset to prevent session termination
when the ESCAPE directive is used in a program.
Description Use EXECUTE to embed Command mode statements directly into a program. A
typical use of this directive is to modify the current program dynamically. When
used in a compound statement, EXECUTE must be the last directive in the line.
Note: By default ProvideX changes the current program. If the EXECUTE directive
starts with a line number, ProvideX modifies the current program and the line becomes
part of the current program, possibly overwriting the existing code. However, if the
system parameter 'EX' is on, it modifies the program at level 1 (the main level).
Note: Under WindX, you can use EXECUTE "[WDX]..." to encapsulate a directive
that is not supported across a WindX connection. See [WDX] Direct Action to Client
Machine, p.795.
Restriction: You can only use this directive in subprograms. Otherwise, ProvideX
returns Error #37: Directive can only execute in subprogram.
Description Use the EXIT directive in a subprogram to terminate the subprogram and return
control to the initiating program.
You can have the subprogram return an error code value to the calling program by using
EXIT ERR or by specifying the error value following the EXIT directive. Use an integer
from 0 to 32767 for the error value. To have the calling program process an error value
other than zero, use the ERR= option in the CALL directive (or use SETERR numeric
expression). If the value is 0 zero, ProvideX does not retry processing.
When you use EXIT in a compound statement, it must be the final directive:
9000 PRINT "Subroutine done"; EXIT
Description The EXITTO directive terminates the currently active FOR..NEXT, GOSUB..RETURN,
REPEAT..UNTIL or WHILE..WEND loop prematurely and transfers control to the
statement number indicated.
EXITTO lets you terminate one of these processes early by removing its associated
entry from the top of the stack. If there is no active entry on the stack, ProvideX
returns Error #27: Unexpected or incorrect WEND, RETURN, or NEXT.
Description Use EXTRACT to read data from the file you specify as the channel. When ProvideX
reads the data, it is split into one or more fields (either separated by the current
delimiter or in an embedded IOList format) with the contents of the first field placed
into variable 1, the second field into variable 2, and so on.
ProvideX automatically converts numeric data when moving it into numeric
variables while processing the EXTRACT directive. Numeric data converted during
an EXTRACT directive does not use the 'DP' Decimal Point Symbol or 'TH'
Thousands Separator system parameters for European decimal settings.
If you want a field to be skipped, use an asterisk * as a place holder for a variable name.
If you specify more variables than there are fields in the record, ProvideX will
initialize the additional variables to either zero (if a numeric variable) or a null string
(if a string variable). The EXTRACT directive will access the record where the file
pointer is pointing, or it will take the record specified using the KEY= or IND=
options. The file pointer remains on the extracted record after it is read.
Use the KNO= option to change the current file access key.
Note: EXTRACT locks the record being read to prevent other users from using a FIND,
FIND RECORD, READ, READ RECORD, EXTRACT RECORD or another EXTRACT to access
it. This lock stays active until the next I/O request for the same file or until the file is closed.
Using a KEY= option or READ, FIND or EXTRACT statement to retrieve the next record
while a record is locked will result in the locked record being returned instead. You can
enable read access for records that have been extracted by setting the 'XI' parameter.
Description Use the EXTRACT RECORD directive to read a record from the file you specify
(channel). ProvideX will return the record's complete data portion in the string
variable you specify.
Apply the EXTRACT RECORD statement when dealing with native-mode operating
system files, when exchanging data with non-ProvideX applications, or when you
want to read a complete record (including data field separators). This directive will
access the record where the file pointer is pointing, or it will take the record specified
using the KEY= or IND= options. The file pointer remains on the extracted record
after it is read.
Use the KNO= option to change the current file access key.
Note: This directive locks the record being read to prevent other users from using a
FIND, FIND RECORD, READ, READ RECORD, EXTRACT or another EXTRACT RECORD
to access it. This lock remains active until the next I/O request for the same file or until
the file is closed. Using a KEY= option or READ, FIND or EXTRACT statement to retrieve
the next record while a record is locked will result in the locked record being returned
instead. You can enable read access for records that have been extracted by setting the 'XI'
parameter.
Description Use the FILE directive to define a file based on the contents returned by the FID( ) or
FIB( ) functions. These functions return character strings with the file type, size, and
format.
Warning: The FILE directive will not recreate an embedded data dictionary. When you
have an embedded data dictionary, use a PURGE or REFILE directive instead, to clear
the data from an existing file and preserve the dictionary.
Note: The format of the FID( ) value will depend on the current emulation mode you
are using for ProvideX. To avoid potential problems when running in emulation
modes, use the value returned from the FIB( ) function instead of the FID( ) function.
Note: This directive is not supported by WindX. When you need to create files on a
WindX PC, encapsulate the command in an EXECUTE "[WDX]..." directive.
Description Use FIND to read data from the file (channel) you specify. When ProvideX reads the
data, it's split into one or more fields (either separated by the current delimiter or
defined by an embedded format with headers, etc.). The contents of the first field are
placed in variable 1, the second field in variable 2, and so on.
ProvideX automatically converts numeric data when executing a FIND statement and
moving numerics into variables. Numeric data converted during a FIND directive does
not use the 'DP' Decimal Point Symbol or 'TH' Thousands Separator system
parameters for European decimal settings.
If you want to skip a field, use an asterisk * as a place holder for the variable name. If
you include more variables in a FIND directive than there are fields in the record,
ProvideX initializes the additional variables to either zero (for a numeric variable) or
a null string (for a string variable). If successful, FIND advances the file position to
the next record (or the record you specify if you use a KEY= or IND= option). Use
the KNO= option to change the current file access key.
Note: If the record is not found when reading using a KEY= or IND= option, the
current file position is not changed (unlike READ).
Description Use the FIND RECORD directive to read a record from the file (channel) you specify.
The record's complete data portion will be returned in the string variable you name.
Apply the FIND RECORD statement when dealing with native-mode operating
system files, when exchanging data with applications other than ProvideX, or when
you want to read a complete record including data-field separators.
If successful, FIND RECORD advances the file position to the next record (or the
record you specify in a KEY= or IND= option). Use the KNO= option to change the
current file access key.
Note: If the record is not found when reading using a KEY= or IND= option, the
current file position is not changed (unlike READ RECORD).
Description Use the FLOATING POINT directive to have ProvideX start using scientific notation
with all numeric data. In scientific notation, a number is represented as a fraction
times ten to some power (e.g., .nnnnn*10^xx is displayed as .nnnnnExx).
In FLOATING POINT mode, no rounding is done on numeric calculations. If the
numeric output is unformatted, ProvideX uses scientific notation (e.g., .314159E+01).
Use the PRECISION directive to end FLOATING POINT mode.
Note: FLOATING POINT notation will change to standard decimal notation during a
RESET operation.
Format 1. Conventional Syntax: FOR var=first TO last [STEP val] ..NEXT [var]
2. Simplified Syntax: FOR var ..NEXT [var]
Where:
first Initial value of the variable var. Numeric expression.
last Ending value of the variable var (value that ends the loop when achieved).
Numeric expression.
NEXT Directive to end the loop. Optional var must match current FOR var.
TO Keyword required for Format 1, not case-sensitive.
STEP Optional keyword, not case-sensitive. Sets specific increment/decrement
value (default is 1).
val Optional value by which the variable will be incremented/decremented
with each pass through the loop. The default is 1.
var Numeric control variable to be incremented/decremented with each pass
through the loop.
Description Use the FOR directive (either conventional or simplified iteration format) to define
the start of a repetitive loop of instructions in a program. If you specify a variable
with a NEXT directive, it must match the variable in the FOR directive. The NEXT
directive can appear anywhere in the program except where it would be executed
inside another FOR/NEXT loop, a GOSUB/RETURN routine, a WHILE/WEND loop,
or a REPEAT/UNTIL loop. The control variable can be omitted from the NEXT
directive because the increment/decrement of the FOR var is assumed automatically.
However, the NEXT var is useful for readability purposes, especially if it appears
within a nested loop structure.
Use the EXITTO directive to halt a FOR/NEXT loop without performing all iterations.
When ProvideX executes an EXITTO directive, it removes the top entry from the
FOR/NEXT stack and ends the current FOR/NEXT loop.
The STEP value, if specified, is evaluated and saved as the increment (or decrement if
negative). A default STEP value of 1 one is used when the increment/decrement is not
declared. An increment of 0 zero is invalid and results in an Error #44: Invalid
step value.
After the FOR directive is executed, the current program statement position is saved
and execution continues. When ProvideX encounters NEXT with the same variable as
in the FOR directive (or no variable name) it increments/decrements the value. If the
new value does not exceed the end value (or fall below it, if decremented), control
transfers back to the FOR directive to continue the loop. Otherwise the FOR/NEXT
loop ends.
Examples:
0010 FOR I = 1 TO 10
0020 PRINT I,
0030 NEXT I
yields: 1 2 3 4 5 6 7 8 9 10
The following example strips trailing spaces from the A$:
0030 A$=......
0040 GOSUB 1000
......
1000 IF A$="" THEN I=0; RETURN
1010 FOR I=LEN(A$) TO 1 STEP -1
1020 IF A$(I,1)<>" " THEN EXITTO 1040
1030 NEXT
1040 RETURN
This uses nested FOR/NEXT loops to generate the string B$ from A$ reversed:
0010 INPUT "Enter character string:",A$
0020 IF A$="" THEN STOP
0030 B$=A$
0040 FOR I=1 TO LEN(A$)
0050 FOR J=LEN(A$) TO 1 STEP -1
0060 B$(I,1)=A$(J,1)
0070 NEXT J; NEXT I
0080 PRINT "The answer is: ", B$
0090 GOTO 0010
Note: The test to determine if the loop will be terminated occurs when the NEXT
directive is encountered; therefore, if the initial value of the loop control variable
exceeds the ending value, the loop will execute once.
Description The FUNCTION directive is used to declare a method for an object in Object Oriented
Programming (OOP). Associated logic is to be called when the method is invoked; e.g.,
FUNCTION Find(X$) LookupCust
... ... ...
LookupCust:
ENTER Cst_id$
... ... ... ! Logic to find the client
RETURN sts ! Return value indicates success
Alternatively, the function logic can directly follow the FUNCTION declaration; e.g.,
FUNCTION Find(X$)
ENTER Cst_id$
... ... ... ! Logic to find the client
RETURN sts ! Return value indicates success.
The declaration ends with a FUNCTION END directive for the method itself, by the
start of the next method declaration, or when END DEF is reached at the end of the
object definition; e.g.,
DEF CLASS "MyObj"
FUNCTION MyFirstMethod()
a=b, d=f
Note: The PERFORM format violates the general rules of OOP encapsulation.
FUNCTION LOCAL indicates that the function is only to be called internally from
within the object. It cannot be called externally.
Examples FUNCTION Find(X$) LookupByName
FUNCTION Find(X) LookupByNumber
... ... ...
LookupByName:
ENTER Cst_id$
... ... ... ! Logic to find the client by name
RETURN ...
LookupByNumber:
ENTER Cst_id
... ... ... ! Logic to find the client by number
RETURN ...
Note: GET_FILE_BOX is supported when you use WindX with UNIX file systems and
supported calls to [WDX]. See [WDX] Direct Action to Client Machine, p.795.
Description Use the GET_FILE_BOX directive to display a standardized window for the user,
allowing the entry or selection of a file or directory in the system.
Format 1: Create
GET_FILE_BOX path$,dir$,window$[ex_list$[,def_ex$,]][,ERR=stmtref]
Note: The path$ variable will receive the full pathname of the file selected. Because
its initial contents will be used as the default pathname, initialize it prior to executing
this directive.
Use this format to select a file. If the initial directory string is null, ProvideX uses the
current directory. Use the form Description|*.XXX, to list standard file extensions.
You can include multiple extensions, comma-delimited (with the last extension
terminated by a comma). If desired, choose a character other than a comma to
delimit each entry. ProvideX uses the last character in ex_list$ (the comma or your
choice) as the delimiter.
Format 2: Check
GET_FILE_BOX READ path$,dir$,window$[ex_list$[,def_ex$,]][,ERR=stmtref]
Use the READ format to make sure that the file you want returned exists; e.g.,
0010 GET_FILE_BOX READ X$,"C:\Program Files\Sage
Software\ProvideX\","File to View"
Format 3: Write
GET_FILE_BOX WRITE path$,dir$,window$[ex_list$[,df_ex$,]][,ERR=stmtref]
Use the WRITE format to save or rewrite the file. If you do this and a user selects a
file that already exists, ProvideX will confirm that the file is to be overwritten prior
returning to the program; e.g.,
0010 GET_FILE_BOX WRITE X$,LWD,"Report file",
"Report files|*.RPT,All files|*.*,","RPT"
This allows the user to have a filename with the default extension .RPT and gives
the user a list of files of two types—Report files (*.RPT) and All files (*.*).
Description Use GOSUB to access a subroutine embedded in your current program. The current
location in the program is saved on a stack and control is passed to the statement
number or label you specify (or if no statement exists with the number specified, to the
next higher statement). ProvideX continues execution from there until a RETURN is
executed. Then it returns control to the position saved on the stack.
If you want to exit from a GOSUB subroutine without returning to the calling point,
you can use the EXITTO directive to remove the return point from the stack. You must
use either a RETURN or an EXITTO directive to terminate each GOSUB subroutine.
Do not place a RETURN directive inside a FOR..NEXT loop or a WHILE..WEND loop.
There is no limit (apart from memory space) to the number of GOSUB..RETURN
entries that you can have on the stack.
Note: The BEGIN, CLEAR, RESET, STOP, and END directives reset all entries in the
GOSUB..RETURN stack.
Where:
stmtref Program line number or label to transfer control to.
Description Use the GOTO directive to have ProvideX transfer execution to the given statement
number or label. If the line doesn't exist, then the statement with the next higher
number will be used.
In Command mode:
-:GOTO 10
-:RUN
Enter a number: 1
1 multiplied by 2 is 2
Enter a number: 3
3 multiplied by 2 is 6
Enter a number: 0
DONE
-:
Description Use the GRID directive to create a table of cells in columns and rows; i.e., a
spreadsheet input format. (For simpler tables use a LIST_BOX Report View, p.189.)
The GRID control object is a two-dimensional array of multi_line input fields
(default), check_boxes, buttons, drop_boxes or any combination of these control objects.
Each cell can be of a different type. The GRID treats as a null any value that has a
length of 0 or consists of zero "0", comma "," or dot "." characters. For some GRID
syntax (e.g., GOTO and FIND), both column and row coordinates are required (to act
as pointers to a particular cell). For other syntax, one or both of the values can be zero
"0". The following chart shows how ProvideX interprets the column and row values.
Column, Row Values How ProvideX interprets these ...
col=0, row=0 All columns and rows respectively; i.e., GRID DELETE
100,0,0 deletes the entire grid whose control ID is 100.
col=1, row=1 The topmost cell is 1,1
Format Definition
The FMT=def$ option allows you to define the format for cells in the grid. In the
following syntax, the round and square brackets are part of the format:
FMT=[col_title](cell_type:col_name$) Alignment Width
Where:
Alignment Alignment character: L (left), C (centred), R (right). Default: L.
cell_type Cell type for the column. The default cell type is "Normal". See
Cell Types for a list of available cell types.
col_title Text string appearing as the title in the top row of the grid.
col_name$ Column name. This can be a string or numeric variable.
width Width of the column in .
Example:
"[Client ID](Multi_line:CST_ID$)L10 [Name](Normal:CST_NAME$)L10"
Grid Properties
The Apostrophe Operator can be used with the unique logical identifier (ctl_id) to
dynamically read and alter a wide variety of control attributes (properties) directly
from the programming language. Most cell attributes are only accessible through the
implementation of properties. For example, drag and drop functionality requires the
'DraggedColumn, 'DraggedRow, 'DroppedOnColumn, and 'DroppedOnRow.
Note: In order to access many grid properties, cell(s) must be identified first using the
'Column and 'Row properties. See Grid Property Access, p.729.
The complete list of properties available for manipulating a grid are described in
Chapter 7. Control Object Properties.
Cell Types
The following cell types can be assigned using the FMT= option in the GRID directive or
via the 'Celltype$ grid object property:
"Button" Cell works like a button if clicked. Cell can be changed if not
locked (on double click). Set 'Lock property to 1 to achieve
standard button behaviour for cell.
"CheckBox" Check box with no 3D effect ('Value=0 or 1,'Text=label).
"CheckBoxRaised" 3D check box that looks raised.
"CheckBoxRecessed" 3D check box that looks recessed.
"CheckMark" Check box that uses a check mark.
"CheckMarkRaised" Raised check box that uses a check mark.
"CheckMarkRecessed"Recessed check box that uses a check mark.
"DropBox" Text cell that, when editing, allows user to make selection
from a drop down list. The drop list is loaded from the
'Text$ property.
"DropBoxHideBtn" Same as "DropBox", but the drop down button is shown
only when focus is on the cell.
"Ellipsis" Normal text cell that will show "…" if text exceeds
displayable area. Ctrl - Enter can be used to force a new line
in the cell (inserts $0D0A$ into cell value).
"EllipsisDrop" Same as "Ellipsis", but forces the cell to drop vertically
only during an edit. Ctrl - Enter can be used to force a new
line in the cell (inserts $0D0A$ into cell value).
"Lookup" Small button at the right side of cell used to invoke lookup -
button image is defined via the cell’s 'Bitmap property. If no
image is given, button shows three dots.
"LookupHideBtn" Same as "Lookup", but indicates that the button is hidden
when the cell is not selected.
"Multi_line" Normal text cell that can contain multiple lines of text.
Ctrl - Enter can be used to force new line (value $0D0A$).
"Normal" Normal text cell containing one line of data.
"Query" Same as "Lookup", but user is unable to edit the cell.
Scroll Modes
The 'AutoTrack property allows you to control the behaviour of vertical and
horizontal scrolling on a grid. The following modes are available:
Normal Dragging the scrollbar thumb (knob) does not update the grid display
until it is released. This is the default mode for scrollbars in ProvideX. It
offers the quickest way to scroll through large amounts of data, but
lacks the visual reference provided by Scrolltracking (below).
Scrolltracking Dragging the scrollbar thumb (knob) continuously updates the grid
display as it is being moved. This mode makes it is easier to see the data
relative to the thumb location, but scroll movement may be sluggish
depending on how large the data is.
Joystick This mode works similar to a joystick. It scrolls by one row at a time and
the thumb/knob always returns to the center of the scrollbar once it is
released from dragging. (Supported for vertical scrolling only).
The following table lists the available 'AutoTrack property codes and their associated
horizontal-vertical scroll modes (Normal=N, Scrolltracking=S, and Joystick= J):
Mode HScroll VScroll
0 N N
1 N S
2 S N
3 S S
4 N J
5 S J
Note: Normal and scrolltracking modes would normally be used when the number of
rows in the data source is known. Use Joystick mode for when the number of rows in
the data source is not known.
Format 1: Define/Create
GRID ctl_id,@(col,ln,wth,ht)[,ctrlopt]
Use this format to create your grid. The value in ctl_id is a unique identifier for your grid.
This value is used to generate a CTL value whenever the grid is selected and changed.
Format 3: Disable/Enable
GRID {DISABLE | ENABLE} ctl_id[,ERR=stmtref]
Use the GRID DISABLE format to disable a grid so that it will be visible but
inaccessible to users. To reactivate it, use GRID ENABLE.
Format 4: Lock/Unlock
GRID {LOCK | UNLOCK} ctl_id,col,row[,width,height][,ERR=stmtref]
Use the GRID LOCK format to allow/deny access to a range of cells in the grid. The user
cannot change the cell's value, but if the cell is a button control the user can still click on
it. Use the GRID UNLOCK format to release the locked range of cells for other processes.
Reminder: If you use zero (0) as your value for both column and row, ProvideX
interprets that as all columns and rows, respectively and will lock/unlock the entire grid.
You can also use a grid control object's properties to lock or unlock cells (by setting
the 'Row, 'Column and 'Lock properties). Set your 'Lock value to 1 (lock) or 0
(zero to unlock). The default background colour for locked cells is LIGHT GRAY
(standard button face colour). Use the 'BackColour property to override this. See
Grid Properties, p.145.
Note: The current functionality for the 'Sort and 'Sort$ properties will override
locked rows.
Format 5: Hide/Show
GRID {HIDE | SHOW} ctl_id[,ERR=stmtref]
With the GRID HIDE format, the grid remains active, but is not displayed. It is still
accessible programmatically. Use the SHOW format to restore the display and user access.
Format 9: Load
GRID LOAD ctl_id,col,row,contents$[,ERR=stmtref]
Use GRID LOAD to load contents$ into the grid from a string variable or expression.
You must include both the column and the row for the address at which the load is
to start. If column and row are both 0 zero then the grid is cleared first.
ProvideX can load a number of columns and rows of data at a time. Column and row
separators are mandatory. Set the column separator using the SEP= option. Set your
row separator by including it as the last character in your data string. (ProvideX
treats the last character in the string as your row separator.)
Adding a New (Bottom) Row: Use row=0 to add a new row to the bottom of a grid;
i.e., GRID LOAD ctl,1,0,data$+ESC ! (Using ESC as the row delimiter)
To determine which cells are selected: use GRID SELECT READ to obtain the first
selected cell, then use GRID SELECT READ NEXT to get subsequent cells.
Reminder: If you use a zero (0) in both col and row, ProvideX interprets that to mean
"all cells" and will select the entire grid.
GRID SELECT ctl_id,col,row[,width,height][,ERR=stmtref]
Select Range. This format selects a range of cells from your grid.
GRID SELECT READ ctl_id,col,row[,ERR=stmtref]
Select Read. Use this to read the first selected cell. If the cell doesn't exist, ProvideX
returns Error #11: Record not found or Duplicate key on write.
Example The example on the following page demonstrates how you can use a combination of
GRID directives and GRID control object properties to perform various functions
(formatting, loading, retrieving, etc.).
Description Use the H_SCROLLBAR directive to create a horizontal scrollbar for a window. Your
program logic can read and adjust a value by increments to control logical column
position within a record every time the user moves the horizontal scrollbar control object.
Format 1: Define/Create
H_SCROLLBAR ctl_id,@(col,ln,wth,ht)[,ctrlopt]
When you create the H_SCROLLBAR, the value in ctl_id is the unique identifier for it.
This value is used to generate a CTL value whenever a user selects and moves the
horizontal scrollbar; e.g.,
0010 H_SCROLLBAR 10000,@(5,20,70,1)
The example above defines a scrollbar 70 columns wide and one line high, starting at
column 5 on line 20. Whenever the horizontal scrollbar is selected a CTL value
10000 will be generated.
Note: Once a new position is selected, you must read it before your application can
use the value to update the actual horizontal scrollbar position.
Format 3: Remove
H_SCROLLBAR REMOVE ctl_id[,ERR=stmtref]
Use the H_SCROLLBAR REMOVE format to delete the horizontal scrollbar.
Format 4: Disable/Enable
H_SCROLLBAR {DISABLE | ENABLE} ctl_id [,ERR=stmtref]
Use the H_SCROLLBAR DISABLE format to gray out a horizontal scrollbar so that it
will be visible but inaccessible to users. To reactivate it, use H_SCROLLBAR ENABLE.
Format 5: Hide/Show
H_SCROLLBAR {HIDE | SHOW} ctl_id[,ERR=stmtref]
With the H_SCROLLBAR HIDE format, the scrollbar remains active, but is not
displayed. It is still accessible programmatically. Use the SHOW format to restore the
display and user access.
Format 7: Read
H_SCROLLBAR READ ctl_id,setting,max,[rgn_chg][,arrow_chg][,ERR=stmtref]
Use the H_SCROLLBAR READ format to read the H_SCROLLBAR settings. For
example, to read the horizontal scrollbar position relative to 1000:
0120 H_SCROLLBAR READ 100,X,1000
Format 8: Update
H_SCROLLBAR WRITE ctl_id,marker,max[,ERR=stmtref]
Use the H_SCROLLBAR WRITE format to update or write the H_SCROLLBAR settings.
Description Use the HIDE directive to hide the specified control from display. The control must
be either on the current window or on a global control (e.g., *100). It will still be
active for purposes of reading/writing but the user cannot see, nor can the program
set focus to, the control.
To re-display a control object, use the SHOW directive.
Description Use the IF directive to control the execution of various ProvideX statements based on
the result of a Boolean expression. Refer to examples on the following page. If the value
returned by the numeric expression is not zero (true) then ProvideX continues
execution with the directives following the THEN clause up to the end of the
statement, or until an ELSE clause is encountered. If the value returned is 0 zero
(false), execution of the statement continues with the directives following the ELSE
clause (if you use it) or with the next statement.
The expression would normally include a logical operator (such as an equals =, less-than
symbol <, or the LIKE Operator, p.816), but you can use any numeric expression.
All statements within an IF..THEN..ELSE structure exist on the same line. These
statements can only span multiple lines if they are enclosed within curly brackets. A
matched set of open/closed brackets must be provided for each set of directives (
missed brackets can cause unexpected results).
Internally, when the system detects a { following the THEN clause it will continue
execution up to the next } (if true) or skip forward to it (if false). The same holds true
for the processing of the ELSE clause. Curly braces should only be used with ELSE if
they are also used with THEN. You can imbed multiple levels of mult-lined IF
directives via curly braces; however, it is important not to lose consistency.
Using END_IF
An optional END_IF (or FI) clause can be used to terminate the current IF structure
and/or to execute a common closing statement. This is particularly useful for
separating ELSE clauses in a nested IF..THEN..ELSE structure. Once the statements
that follow an END_IF clause are executed, control will fall through to the next line, or
(if nested) to the preceding level of IF..THEN..ELSE.
Compound IF Statement:
00010 FOR i=1 TO 30
00020 PRINT i," is divisible by ",
00030 IF MOD(i,2)=0 \
THEN IF MOD(i,3)=0 \
THEN PRINT "both" \
ELSE PRINT "2" \
ELSE IF MOD(i,3)=0 \
THEN PRINT "3" \
ELSE PRINT "neither"
00040 NEXT i
00050 STOP
RUN
1 is divisible by neither
2 is divisible by 2
3 is divisible by 3
4 is divisible by 2
...
28 is divisible by 2
29 is divisible by neither
30 is divisible by both
Description Use the INDEXED directive to create a file that can be accessed either sequentially or
by record number (index).
Make the record size long enough to contain the maximum record length (i.e., the
combined length of the data fields plus field separators). If you use a filename that
already exists, ProvideX returns an Error #12: File does not exist (or
already exists).
Use the SEP= option to set the default separator for a given file. Use any character
from $00$ to $FF$, or use SEP=*. When the asterisk * is set as the value, fields will
not be delimited. ProvideX writes records to the file with field type and length
headers. This feature may provide better results in overall file performance.
WindX supports the use of this directive via the [WDX] tag; e.g., INDEXED
"[WDX]somefile.ext"... For more information, see [WDX] Direct Action to
Client Machine, p.795.
Description Use the INPUT directive to issue prompts to and receive input from a terminal
device. You would normally use the logical file number to refer to a terminal. Input
from the user is stored in a variable specified. ProvideX treats any literals or
expressions included in the statement as prompts. When a numeric variable is
specified, numeric data must be received. Non-numeric input in response to a
numeric variable (other than commas and decimals) will cause an Error #26:
Variable type invalid.
If you use the EDIT clause, the current values for the variables are loaded into the input
buffer so that the user can edit them.
Use a format mask with the INPUT directive to control the input. To do this, append
a colon and the mask to the given variable in varlist. If you omit a format mask for a
numeric in an INPUT statement, the 'DP' Decimal Point Symbol and 'TH' Thousands
Separator system parameters are ignored for European decimal settings.
If an INPUT EDIT statement has both a format mask and a validation list, make sure
that the validation list contains only entries that are possible. For example, if the
format mask indicates that the input value must be a single character, do not use a
null ("") value in the validation list.
Instead, valid input for "no value" could be a blank / space in this instance, as in:
0030 INPUT EDIT (0,ERR=0030)@(10,10),VAR$:"A":("Y"=0040,"N"=0050,""=0060)
Use the IND= option to set the position of the cursor in the INPUT field. Use
IND(chan) to obtain the position where the cursor was left after the INPUT.
ProvideX provides the ability to edit all user input through the use of various
keyboard function and control keys. The following table provides a list of the input
editing keys within ProvideX:
Ctrl - BACKSPACE and Ctrl - Delete erases/clears input and resets input field to spaces.
Ctrl - End clears input from the current cursor position to the end of the line.
Tab / Shift - Tab advances/backspaces 10 spaces over input.
Ctrl -RIGHT-ARROW advances to next word.
Ctrl -LEFT-ARROW moves to the previous word.
Use IND=X as a parameter for the INPUT statement to set the starting point in an
input field. For example, to start the input at the tenth character of A$:
Use IND(0) to find out the character position where the user terminated input. For
example, if the user enters "Now is the time", and presses Home and Tab the cursor
moves to the 10th position, just after the "e" in "the". Then, if the user presses Enter
or any other function key to terminate the input, the value returned in IND(0) is 10.
Description The INSERT directive is used to write a new record to a file (channel/logical file
number). The syntax for this directive is identical to the WRITE Directive, p.379;
however, INSERT only writes a record if does not exist and will return an error if the
record already exists.
INSERT may be used against Keyed, Memory, ODBC, and OCI files. When IND= is used
with *MEMORY*, this directive inserts a new index.
Tip: Use the SYS( ) function instead of the INVOKE directive if you wish to test the
successful conclusion of an operating system command.
If you are not concerned about the return status of a command and are running PVX
UNIX and PVX Windows, there is no difference between using an INVOKE directive
and the SYS( ) function. When SYS( ) is used under Windows, ProvideX waits for the
spawned task to complete or for the program to be reactivated via the mouse. When
the INVOKE directive is used under Windows, ProvideX spawns the task and
continues without waiting for the task to complete.
Use INVOKE WAIT directive to wait for the task, which is the same as using the
SYS( ) function. Use INVOKE HIDE to spawn a task in a minimized window.
Description Use IOLIST to define a common I/O parameter list (IOLIST). ProvideX ignores the
IOLIST directive when it encounters it during program execution until it is used in
conjunction with file I/O directives (e.g., READ, WRITE, etc.) and composite string
definitions. For more information, see Input/Output Parameters, p.114 in the
User’s Guide.
If you do not specify size, the default is VLR with a maximum record size
of 256. The maximum block size for a VLR file is 31KB and the maximum
record size is 31000 bytes. Attempting to create a VLR file with a record size
more than 31000 bytes results in an FLR file with the requested record size.
fileopt Supported file options (see also, File Options, p.804):
BSZ=num Block size. Numeric expression (1 - 63).
ERR=stmtref Error transfer.
SEP=char$ Default field separator character. Hex or ASCII string value.
OPT=char$ Single character settings:
"C" - Compressed. Adds simple compression to record data.
"X" - Extended Record Size. Extends record sizes up to 2GB per record.
"0" - Create VLR/FLR files (default if 'KF'=0)
"1" - Create EFF Files with 2GB limit.
"2" - Create EFF Files without 2GB limit (supported platforms).
"Z" - Set ZLib Compression for VLR and EFF Files.
Notes: OPT="2" generates Error #99: Feature not supported
on platforms that do not offer Large File Support (LFS). Using options
"Z" and "C" together will result in an Error #32.
For OPT="X", extended records are written to the file in segments
based on the defined record size. A 12000-byte record would require 2
individual segments for a file with a record size of 8000. The first record
segment would contain the first 8000 bytes and the second segment
would consist of the remaining 4000 bytes.
It is imperative that the data used to comprise the key reside within the
initial record size.
Note: Only one of the auto-increment options ("#", "+" or "I") can be used per file.
Character Definition
"#" Auto-increment - Space filled string. (VLR/EFF only)
"+" Auto-increment - Zero filled string. (VLR/EFF only)
"-" Support signed binary integers as key segments. This option cannot
be used in conjunction with the following segment options on the
same segment: "#", "+", "C", "D", "I", "L", "T", "U", "Z".
"A" Ascending key (assumed).
"C" Force uppercase for individual key segments to create
case-insensitive keys; e.g.,
KEYED "filename",[1:1:10:"C"],[2:1:40:"L"]+[1:1:10:"C"]
Character Definition
"C" Conversion tables for upper/lowercase conversions are located in
the ProvideX message file *MLFILE.EN. You can set these tables
using the DEF UCS and DEF LCS directives and retrieve values using
the UCS(*) and LCS(*) functions.
"D" Descending order (default is ascending).
"I" Binary auto-increment (VLR/EFF only). Field (1, 2, or 4 bytes in length)
will be auto-incremented as records are added to the file. Key must be
record-based; i.e., field is 0 and offset is location in record.
"K[:n]" Null key suppression (VLR/EFF only). n is the hex value of the character to
suppress if all characters match (defaults to $00$ if not specified). If the
entire key evaluates to null, the key will not be a part of this key tree. This
cannot be used on a primary key or in conjunction with the "N" option.
"L" Force lowercase for individual key segments to create
case-insensitive keys. See the example and note in "C", above.
"N[:n]" Null segment suppression (VLR/EFF only). n is the hex value of the
character to suppress if all characters match. If any segment within the
key evaluates to null, the key will not be a part of this key tree. This
cannot be used on a primary key or in conjunction with the "K" option.
"S" Swapped (same as SWP( ) type 7, Intel x86 style swapping VLR/EFF
only).
"T" Force automatic accent translation for individual key segments (i.e.,
to translate accented/extended characters to their non-accented
counterparts). You'll find this useful for sorting multilingual
characters into a single unified sort sequence;e.g.,
KEYED "filename",[1:1:40:"T"],[2:1:40:"TCD"]
Conversion tables for accent translations are located in the
ProvideX message file *MLFILE.EN. You can set this table using the
DEF CVS directive and retrieve values using the CVS(*) function.
"U" If you declare an alternate key segment as unique, then no duplicate
keys are allowed on writing a record. (ProvideX generates Error #11:
Record not found or Duplicate key on write.) If you
designate any segment in a key definition as unique, then the entire key
will be unique. (Primary key must always be unique.)
"Z" Zero terminated strings (VLR/EFF only). This will consider a null
byte ($00$) in a string as the end of the data within the field, and will
ignore any data between the null byte and the end of the key field
(also known in C as a Z-string).
Description Use the KEYED directive to create a file with one or more keys. If the first field in the
directive after the filename is a number, ProvideX creates an external file key (i.e., an
index to the file). If the first field in the directive is a key definition enclosed in
square brackets [ ], then ProvideX uses only internal key fields instead.
ProvideX considers the first key specified for a Keyed file to be the primary key.
Every record must have a unique primary key. You can have duplicate secondary
keys from record to record.
Note: By default, the KEYED directive will create variable-length record (VLR) data files
or fixed-length record (FLR) formatted files; however, by setting the 'KF' system parameter
("KF"=2) or by setting OPT="2" in the syntax, KEYED can also be used to create Enhanced
File Format (EFF) files on platforms that support Large File System (LFS), 64-bit
addressing. For more information on EFF refer to the CREATE TABLE Directive, p.57.
For VLR/FLR files, there is a maximum of 16 key fields allowed on a file with a
maximum of 96 data components making up the 16 keys. There is no limit (other
than the maximum of 96 key components) to the number of fields that comprise a
single key. For EFF, there is a maximum of 255 keys allowed on a file with a
maximum of 255 data components making up the 255 keys. The initial implementation
of EFF (in Version 6) is limited to 96 keys and 96 segments.
If a given filename already exists, ProvideX returns Error #12: File does not
exist (or already exists).
Use the SEP= option to set the default separator for a given file. Use any character
from $00$ to $FF$, or use SEP=*. When the asterisk * is your value, the fields will
not be delimited. ProvideX writes records to the file with field type and length
headers. This feature can provide better results in overall file performance.
Note: WindX supports the use of this directive via the [WDX] tag; e.g., KEYED
"[WDX]somefile.ext"... See [WDX] Direct Action to Client Machine, p.795.
For more information refer to DIRECT Create File with Keyed Access, p.88, and
Multi-Keyed Files, p.103 in the User’s Guide.
If you see the message Corrected Missing Key when ProvideX attempts to
WRITE, UPDATE, or REMOVE a record in a Keyed file where a change to the primary
or alternate key table is needed (e.g., for an alternate key to a customer name when
the name changes or for removal of all keys when a record is deleted), the message
indicates that the key entry to be changed was not found. This is not a fatal message,
but usually means that the file has been corrupted in some way. You should check
the file using *UFAC or try to recover it using *UFAR (ProvideX utilities).
Description This directive is used to rebuild the key tables of a file which is currently open on a
channel. KEYED LOAD (chan) rebuilds all key trees. To rebuild a specific key chain,
use the file access key value KNO=num | name$. KEYED LOAD will identify
duplicate primary or unique keys.
The file does not have to be locked for KEYED LOAD to work. KEYED LOAD rebuilds
the key chains within the file without using more disk space, while the file is in use,
and while the file is being updated by others. KEYED LOAD is much faster than *UFAR
in repairing key trees.
However, it performs much faster if the file is locked, and if there is sufficient ram
available for its key block buffering operations. Also, KEYED LOAD will update the
number of records for fixed length files if the file is locked.
Once the KEYED LOAD command is completed, TCB(67) will be set to one of the
following values:
> 0 represents the number of keys reloaded.
- 1 indicates that a different number of keys were encountered on different key
chains. This may or may not indicate that the file being re-loaded has physical
damage that KEYED LOAD is unable to correct; i.e., the file can be reloaded on
the fly while others are adding records, and therefore the number of keys on a
given key chain may have changed while KEYED LOAD was working.
Note: KEYED LOAD reports invalid file type when used on Sort files. KEYED LOAD
will not operate on files opened in Read-Only mode.
Description Use the LET directive to set a variable to the value of an expression. If the variable is
numeric, use a numeric expression. If it is a string variable, use a string expression.
You can use substrings with string variables. (Specify the starting position and
optional length.)
The word L E T is optional. ProvideX assumes use of the LET directive when it
encounters a statement that starts with a variable. You can include multiple LET
directives in one statement by using comma delimiters. In this case, if you use the
word L E T, it only occurs once, before the first assignment.
You can initialize, copy, or manipulate a complete array by specifying {ALL}
following the variable name. {ALL} can be used on both sides of an equation. Note
that the curly brackets { } are part of the syntax.
Other Examples:
-: Z4=A+4.5,Z5=Z4*.85
-: LET D$=DAY,T=TIM*3600
-: DIM A[30]; LET A{ALL}=A{ALL}*4
Description The LIKE directive is used in Object Oriented Programming (OOP) to inherit the
properties from one or more other classes. All properties and methods are inherited
from the specified classes.
When multiple occurrences of the same property/function are found within the
inheritance, the first class declared in the LIKE directive takes precedence.
Description Use the LINE_SWITCH directive to switch all I/O currently sent to channel or logical
file number 0 (zero, the terminal) to another device. Its primary purposes are to
allow for secondary users on a PC or to provide remote maintenance capability.
While the LINE_SWITCH is in effect, the original device is disabled. ProvideX will
expect to receive all input from and send all output to the new device designated as
file or channel 0 zero.
Use a LINE_SWITCH directive with no parameters to restore communications with
the original device on channel (logical file number) 0 and CLOSE the alternate file.
Examples -> LINE_SWITCH "PORT2" ! Defines/opens PORT2 as logical file number (0)
-> LINE_SWITCH ! Closes PORT2, restores terminal/console as logical file
#(0)
Description The LIST directive converts program statements from the internal (compiled) format
to a readable listing that can be sent to a file or to the screen. This directive gives you
a listing of the contents of a program's statements as they were entered into the
system originally. That is, it will return a series of directives, variables, and
operators, with line numbers.
The listing will not necessarily match exactly the way in which a statement was
entered in the first place, but will be syntactically the same. For instance, if you
entered 510 A$="Example" and then used the LIST directive, ProvideX would
return 0510 LET A$="Example".
If you use the LIST directive with no file number or options, the output will be
displayed on your screen. You can direct the output of the LIST directive to any serial
or indexed file or to a device (e.g., a printer or terminal). For more information, see
File Handling, p.97 in the User’s Guide.
If the output of a list command goes to your terminal, the listing stops to allow you
to read the program page by page. To continue the listing, simply hit the Enter key.
To stop the listing, use the F4 key. All other input is discarded.
If the listing of a statement exceeds the maximum allowed length of a record for a
given file (e.g., 80 for terminals), the statement will be broken into multiple segments
(records/lines). The first n characters (where n is the maximum segment length) will
be contained in the first segment with each subsequent n characters up to the end of
the statement sent in subsequent segments. Each continuation segment will be
prefixed by the line number followed by a colon ":" and a space.
Note: If a semicolon (;) is used as the first character of a line, ProvideX will hide the
line from listings making it appear as if it did not exist. The line will execute correctly,
but it cannot be viewed via the LIST directive.
Example:
0010 PRINT 'CS'; BEGIN; LIST
0020 LIST_BOX 100,@(2,16,12,6),OPT="#"
0030 LIST_BOX LOAD 100,"Cat/Dog/Pig/"; WAIT 1
0040 ! If you read the ITEMS$ now, the returned value is null:
0050 LIST_BOX READ 100,ITEMS$;WAIT 1; PRINT ITEMS$+"Before Write"
0060 LIST_BOX WRITE 100,"Cat"; WAIT 1 ! Select "Cat"
0070 LIST_BOX READ 100,ITEMS$; PRINT ITEMS$
0080 LIST_BOX LOAD 100,2,*; WAIT 1 ! Removes "Dog"
0090 LIST_BOX WRITE 100,2 ! Select second item
0100 LIST_BOX READ 100,ITEMS$; WAIT 1; PRINT ITEMS$
0110 ESCAPE
-:run
Before Write
Cat/
Cat/Pig/
"|" Pipe (Tree View only). Show connecting lines.
LIST_BOX 100,@(10,10,10,10),OPT="e,|"
If OPT="|", the tree view displays connecting lines between various nodes of
the tree.
"~" Tilde. Standard and formatted list boxes only. No height adjustment.
Normally, a list box displays an integral number of lines. If OPT="~", the list
box will not be forced to show only complete lines. ProvideX will truncate the
last line horizontally (i.e., displaying a partial line to ensure that the height of
the list box matches the size you defined).
"A" Auto signal is on. ProvideX returns a signal on all changes in the list box.
"b" Suppress column heading or expansion and collapse (Report View and Tree
View only). In a report view, "b" suppresses the column header; e.g.,
LIST_BOX 100,@(10,10,10,10),OPT="r,b"
When you use "b" for a tree view, the "+" and " -" buttons (for the expansion
and collapse of the tree) are suppressed; e.g.,
LIST_BOX 100,@(10,10,10,10),OPT="e,b"
"B" List box has no border or frame.
"d" List box is permanently disabled. (Cannot be enabled.)
"D" or "1". List box is initially disabled.
"e" Define Tree View. By default, a tree view shows the data as a tree with tree level
"+" and " -" buttons (for the expansion and collapse of the tree). A tree view
displays and maintains the data in sorted order. When you add elements to a tree
view list box, ProvideX automatically creates and inserts the elements. Bitmaps
or icons are optional. See Tree View, p.192.
"E" Edit Mode - (Tree View only). This enables automatic editing; i.e., the user can
double click on an item to change its value. The editing of items does not
support the following input options:
- Format mask processing
- Justification (right/centre)
- Password masking
- Input start at end (append text)
- Force numeric or uppercase
- Reverse input
- Input length limitations
- Signal on all keystrokes.
"G" Global. Keep active when focus changes to a new/non-concurrent window.
"h" List box is permanently hidden. (Cannot be shown.)
"H" List box is initially hidden.
"l" Define List View. Lowercase L defines a list view list box. This list box style
displays a single-element list over multiple columns. (Columns wrap from the
bottom of one to the top of the next column.) An optional bitmap/icon can be
placed to the left of the data element. See List View, p.189.
"p" Highlight partial matches (Report View and Tree View only). WRITE
directives with strings are interpreted as selecting/highlighting items whose
leading characters match the data you are writing. That is, if "ABC" is
entered, then the first item starting with “ABC” will be highlighted (or all
items starting with "ABC" if OPT="#" is set to allow multiple selections); e.g.,
LIST_BOX 100,@(10,10,10,10),OPT="l,p,#"
or
LIST_BOX 100,@(10,10,10,10),OPT="r,p"
"q" Disable sorting (Report View and Tree View only) .
In list view (report style), that suppresses the use of the column header to sort
data; e.g.,
LIST_BOX 100,@(10,10,10,10),OPT="r,q"
In tree view, items added to the list are always added at the end of their
respective trees; e.g.,
LIST_BOX 100,@(10,10,10,10),OPT="e,q"
"r" Define Report View. Defines a report view list box. This is a formatted list box
that allows optional headings, sorting, and other attributes. Each column of
data has an optional {column-header} for sorting data. An optional bitmap/icon
can be placed at the beginning of the row/line). See Report View, p.189.
"s" Scroll. Control can scroll within a resizable/scrollable dialogue box.
"T" Strip trailing spaces when reading or writing data for a list box.
"v" First Column highlight (Report View only). Controls the highlight style for
individual list boxes and overrides print mnemonic '+V'; e.g.,
LIST_BOX 100,@(10,10,10,10),OPT="r,v"
If the user clicks anywhere on a row, only the first column of the row will be
highlighted. See also, '+V' & '-V' Mnemonics, p.641.
"V" Full Row highlight (Report View only). Controls the highlight style for
individual list boxes and overrides print mnemonic '-V'; e.g.,
LIST_BOX 100,@(10,10,10,10),OPT="r,V"
If the user clicks anywhere on a row, the entire row will be highlighted. See
also, '+V' & '-V' Mnemonics, p.641.
"Z" Cursor changes to "resize" pointer if within 4 pixels from the edge of the control.
Description Use the LIST_BOX directive to create a list box, a preset list of data elements from which
the user can select items. Standard list boxes contain a single column of data with no
formatting; however, this directive can be used to create a variety of list box styles.
Users can select any element from a list of items you assign to the list box, but
variable input is not allowed. That is, the user can only select - not enter - values. If
you need a list box that allows both variable input and selection from a list, refer to
VARLIST_BOX Control List Box, p.356.
Dynamic Properties
The Apostrophe Operator can be used with the unique logical identifier (ctl_id) to
dynamically read and alter a wide variety of control attributes (properties) directly from
the programming language. Complete lists of the properties available for manipulating
LIST_BOX, LIST_VIEW, or TREE_VIEW objects are described in Chapter 7. Control
Object Properties.
Note: The LIST_BOX formats described below apply to all list box types.
Format 2: Remove
LIST_BOX REMOVE ctl_id[,ERR=stmtref]
Use the LIST_BOX REMOVE format to delete a list box. (To delete an individual
element, use the LIST_BOX LOAD directive instead.)
Format 3: Disable/Enable
LIST_BOX {DISABLE | ENABLE} ctl_id[,ERR=stmtref]
Use the LIST_BOX DISABLE format to gray out a list box so that it will be visible but
inaccessible to users. To reactivate it, use LIST_BOX ENABLE.
Format 4: Hide/Show
LIST_BOX {HIDE | SHOW} ctl_id[,ERR=stmtref]
With the LIST_BOX HIDE format, the list box remains active, but is not displayed. It is
still accessible programmatically. Use SHOW to restore the display and user access.
When creating a tree view list box (OPT="e"), use the control option OPT="!". (see
Tree View, p.192). In this case, image names are assigned to the elements using
curly braces, as shown in the syntax below:
0010 LIST_BOX 10,@(10,10,50,10),OPT="e,!"
0030 LIST_BOX LOAD 10,"{!Stop}Cat/{!File}Dog/{!Checkmark}Pig/"
For more information on the options available for displaying internal/external images
and the recognized image file types, see Handling Images and Icons in the User’s
Guide, p.398.
Note: A WRITE to the list box using an index of 0 zero will reset all highlighted lines.
Note: This behavior can be altered by use of the '+N' & '-N' Mnemonics, p.619.
Formatted A formatted list box allows you to display multiple data elements over multiple
columns in a table format. This type of list box is created by adding FMT= settings to
the LIST_BOX definition (see Format 1: Define/Create List Box, p.183).
Note: The maximum length of an element in a formatted list box is 256 bytes.
Example:
LIST_BOX 10000,@(5,5,35,10),FMT="L15 R5 N12 C3/B5 L25"
This loads the contents of the columns in a formatted list box from a delimited data
string (positional data for the entries in the list box). The default delimiter is the SEP
character (e.g., $8A$). To change this, use the SEP= option. Note that the value for
the field delimiter (in this case, SEP) and the value signalling the end of row (in this
case, $0A$) must be different. For the previous example:
"1123 East Main"+SEP+"Ont"+SEP+" 123.45"+SEP+"*"+SEP+"North Bay"+SEP+$0A$
Normally, background colours are dimmer than their respective foreground colours. If
you want to use the background (dimmer) colour for foreground text, prefix the colour
with the 'SB' (Set Background) mnemonic. If you want to use foreground colour
brightness for the background, prefix the colour with the 'SF' (Set Foreground) mnemonic.
All colours are reset to LIST_BOX default standards at the end of each column.
Note: This is not standard text plane colour handling. To get light gray background
use 'SF'+'_WHITE' since '_WHITE' yields bright white.
List View A list view list box is similar to a standard list box, but it displays the data as a
continuous list over multiple columns. When loading a list view you can place an
optional bitmap or icon to the left of the data element. This type of list box is created
by adding OPT="l" (lower case L) to the LIST_BOX definition (see Format 1:
Define/Create List Box, p.183); e.g.,
0200 LIST_BOX 100,@(2,14,12,6),FNT="*",OPT="l"
Use FMT= to override the default column sizing of the list view (only "Ln", "Rn",
and "Cn" alignment are supported). To indicate that a bitmap/icon is to be placed to
the left of the data element, include a set of {} curly braces in the FMT= string. See
Loading Data with Images, p.184. This type of list box also allows use of the
partial match (OPT="p")option (see LIST_BOX OPT= Settings, p.179).
Report View A report view list box displays multiple data elements in table form (similar to a
Formatted list box), but can also include optional headings, sorting, and other
attributes. For a more elaborate version of this list box style, use a GRID, p.142.
When loading a report view, you can include a bitmap/icon to be displayed at the
beginning of each row/line. This type of list box is created by adding OPT="r" (lower
case r) to the LIST_BOX definition (see Format 1: Define/Create List Box, p.183); e.g.,
LIST_BOX 10000,@(5,5,35,10),FMT="[Company]L10 [Vendor]C6
[Amount]#R12",OPT="r"
The following chart describes FMT= settings for line 0100 in the previous example:
Position Header Title Width Alignment
Col. 1, Line 1 Custno 10 L = Left
Col. 2, Line 1 Name 20 L = Left
Col. 3, Line 1 Address 20 L = Left
Col. 4, Line 1 Category 10 C = Centred
Col. 5, Line 1 Amount 10 R = Right
Row Highlighting
Report views support first column highlight (no matter where the user clicks on a
row) and full-line highlight (where the entire row is highlighted). Set highlighting
for individual list boxes using OPT= (either "v" or "V") when creating the list box.
You can control the highlighting style system-wide by setting the print mnemonics
'-V' and '+V'. For more information, refer to Format 1: Define/Create List Box,
p.183 and '+V' & '-V' Mnemonics, p.641.
Tree View A tree view control object can be created by setting OPT="e" in the definition of a list
box. (See Format 1: Define/Create List Box, p.183.) Tree views provide a
hierarchical view of the data, using a collapsible tree structure to represent a list box.
As items are loaded into the tree view, ProvideX automatically parses the entries
based on your given delimiter and creates all intervening tree levels required. For
instance, if you use a slash as your delimiter and load the single entry aaa/bbb/ccc,
ProvideX will generate three entries in the tree view:
aaa
aaa/bbb
aaa/bbb/ccc
If you then load aaa/bbb/ddd, ProvideX only creates one new entry for
aaa/bbb/ddd (since aaa and aaa/bbb already exist). If you add aaa/xxx/iiid,
ProvideX creates two new entries: one for aaa/xxx and one for aaa/xxx/iii.
When an item from a branch is selected, the list box READ returns the item,
including its parent branches. In the example above, selecting ccc would return
"aaa/bbb/ccc/".
Note: The unique logical identifier (ctl_id) assigned during the creation of a tree view list
box can be used with the apostrophe operator to dynamically read and alter a wide
variety of control attributes (properties). Available properties are described in Chapter 7.
Control Object Properties.
As mentioned earlier, OPT="e" establishes a tree view definition. Several other
OPT= settings can be used to refine the definition: "!" (bitmaps or icons), "|"
(show connecting lines), "b" (suppress expansion/collapse buttons); "E" (enable
automatic editing), "q" (disable sorting). For complete descriptions, see LIST_BOX
OPT= Settings, p.179.
Description Use the LOAD directive to read a program into memory (i.e., to open or retrieve a
program) for execution, listing, or modification. The program you load into memory
replaces the current program, if any.
On a LOAD, ProvideX resets the FOR/NEXT, GOSUB/RETURN, and WHILE/WEND
stack. Any addresses set in SETERR or SETESC directives are cleared and the current
PRECISION is reset to two. The current DATA pointer is also reset to the start of the
program. No user data areas or files are affected by the LOAD directive.
You can only use the LOAD directive in Command mode or with the EXECUTE
directive. Misuse of the LOAD directive in Execution mode (i.e., without the
EXECUTE directive) generates Error #45: Referenced statement invalid.
If you omit the program filename, ProvideX loads the last file for which there was a
LOAD, RUN, or SAVE. If there is no prior file in the stack, ProvideX returns
Error #10: Illegal pathname specified.
Note: ProvideX accepts certain typographical errors. For instance, it accepts LAOD as
a substitute for LOAD.
->DELETE
->LOAD
Error #10: Illegal pathname specified
Description The LOAD CLASS directive is used in Object Oriented Programming to pre-load a class
definition into memory from a .pvc file. A LOAD CLASS "aaa" without any
filename$ specified will auto-load from aaa.pvc. The first code in the .pvc file
must be a DEF CLASS directive, using the same class name (class$) as is specified in
the LOAD CLASS directive.
Normally an OOP class definition is loaded into memory the first time an object of
that class is instantiated, and that class definition remains in memory and is used for
all subsequent instances of the same class.
Note: ProvideX accepts certain typographical errors. For instance, it accepts LAOD as
a substitute for LOAD.
Description This directive loads into memory the contents of a Variable Definition file (created
via the SAVE DATA directive). These variables are read-only, and any attempt to
change them will result in an Error #61: Authorization failure. Global
variables are not supported.
START
DUMP
! ERR=0, CTL=0, RET=2
! Level=1
! PGN="<Unsaved>"
! Loaded data....CO_DATA (C:\Documents and Settings\Default
User\Application Data\CO_DATA)
COMPANY$="ABC Company"
DIVISION$="Laundry Division"
COMPANY_CODE=1
COMPANY_CODE=2
Error #61: Authorization failure
Description The LOCAL directive is used to reassign variable names temporarily within a called
procedure, without affecting the original contents (if any). In Object Oriented
Programming (OOP), the LOCAL directive is similar to the PROPERTY directive, but is
used to declare data that is only visible to processing logic within the object itself.
6000 CHK_IT:
6010 LOCAL X$,X; LET X$="CHECK X:"; PRINT X$,X
6020 LET X=X+10
6030 PRINT X$,X
6040 RETURN
7000 LOOP:
7010 PRINT "START LOOP, X=",X
7020 LET X$="LOOP" ! Not designated as LOCAL
7030 FOR LOCAL X=1 TO 4
7040 PRINT X$,X
7050 NEXT X
7060 RETURN
-:run
START TEST, X= 1234
CHECK X: 0
CHECK X: 10
TEST DONE
START LOOP, X= 1234
LOOP 1
LOOP 2
LOOP 3
LOOP 4
LOOP 1234 DONE
Variables in function definitions can be designated as local to prevent changes in
program variables:
0010 DEF FNXY(LOCAL X,LOCAL Y,LOCAL Z)=X+Y+Z
Description Use the LOCK directive to reserve a given file for exclusive processing by the
user/program. Once a file is locked, no other user or program can gain access to it.
However, if another user already has the given file open, the OPEN and LOCK
directives fail and ProvideX returns Error #0: Record/file busy.
Format LONG_FORM
Description Use the LONG_FORM directive to have the ProvideX compiler's input-parsing
routine accept long variable names (default mode). The complementary directive is
SHORT_FORM, which allows only short variable names.
You can write programs in either SHORT_FORM or LONG_FORM or a combination of
both. You can also run programs in either mode.
Examples -:LONG_FORM
-:LONG_NAME$="OK"
-:SHORT_FORM
-:LONG_NAME$="NOT OK IN SHORT_FORM"
Error #20: Syntax error ...ONGNAME$="L... (Long variable name not
accepted)
-:L$="OKAY IN SHORT_FORM"
Description Use the MENU_BAR directive to define and control the menu across the top of a
window.
The example below shows a menu string containing File and Edit, each with a
submenu (File: Open, Save, and Quit – Edit: Add and Delete). Each item has a
shortcut key. Quit has both the shortcut key, Q, and a control ID value, 4.
MENU_BAR 100,"-[&File,&Edit],F:[&Open,&Save,&Quit=4],E:[&Add,&Delete]"
ProvideX includes the HELP selection on all menu bars by default. You can suppress
the HELP selection by inserting a minus sign "-" as the first character in a menu
definition string, as in the example above.
Right-justify a description of the menu entry (e.g., to tell users what function key
will give them quick access to the selection). Use the tab character $09$ to separate
the text to be right-justified; e.g.,
MENU_BAR 99,"[&File,&Edit...],E:[&Cut"+$09$+"Shft-DEL,&Paste"+$09$+"Ins]"
Using Images
Images can be included for each item in the menu. Enclose the image name in curly
braces and place it in the menu definition just prior to the specific item text; e.g.,
MENU_BAR 1000,"-[&File],F:[&Open=1001,{!Stop}&Stop=1002]"
Use a leading exclamation point (!) to identify the image as internal, or specify the
relative path and filename to access an image file that is external. The first bitmap
determines the dimensions used to display menu items (up to 64x64). Transparency
options can also be included. "T" indicates use of the upper left most pixel colour,
and "G" means use colour RGB: 192,192,192; e.g.,
E:[{!Copy,t}&Copy,{!Paste,g}&Paste]
For more information on the options available for displaying internal/external images
and the recognized image file types, see Handling Images and Icons in the User’s
Guide, p.398.
Two-Tone Effects
Both the MENU_BAR and POPUP_MENU directives support the use of two optional
parameters for defining background and left edge colours in menus (similar to MS
Office applications):
LEFT(arg) Background colour for the bitmap portion of the menu. Must be
placed outside "[...]" menu definitions.
FILL(arg) Background colour for the right/text side. If placed outside "[...]"
menu definitions it will serve as the default colour for all menu
items. If placed within "[...]", it will be considered the colour
associated with a specific menu item.
The arg value is defined using the same format as the Colour Properties, p.723. In
the following example, the RGB colour 200,200,200 is used for the left edge of all
entries in this menu:
MENU_BAR 10,"LEFT(RGB:200,200,200),[&File,&Edit,&Help],F:[...."
POPUP_MENU "LEFT(RGB:200,200,200),[&Cut,&Paste,&Delete]",x$
The next example uses the RGB colour 255,255,150 as the background colour for all
of the text portion of the menu.
MENU_BAR 10,"FILL(RGB:255,255,150),[&File,&Edit,&Help],F:[...."
POPUP_MENU "FILL(RGB:255,255,150),[&Cut,&Paste,&Delete]",x$
In the following, the menu will have the "Delete" entry highlighted with a
different colour background:
MENU_BAR 10,"[&Edit],E:[&Cut,&Paste,&Delete=FILL(RGB:255,255,192)]"
POPUP_MENU "[&Cut,&Paste,&Delete=FILL(RGB:255,255,192)]",x$
Note: The colours only affect vertical portions on the menu, not the area that runs
horizontally across the top. Also note that system-supplied Cut, Copy, Paste, and
Delete menu items will adhere to the FILL(arg) and LEFT(arg) definitions for the menu.
Description Use the MERGE directive to add program statements from a source file to the current
(target) program. You can use a MERGE directive for serial or indexed files. You can
also use it with Memory files. The source file must contain records that are
statements in valid List format (i.e., with correct syntax, line numbers, etc.).
Warning: During the MERGE process, if a statement from the source file has a line
number matching a line number in the target program, the statement from the source
file will overwrite the corresponding statement in the target program.
You have to include line numbers in the source file, but you do not have to put them
in numeric order. ProvideX reads them into the target program in ascending
sequence as if they were entered in Command mode, but will place them in the
correct numeric sequence, using the source file's numbering.
If a source file contains a statement without a statement number, or with an invalid
statement number (outside of the allowed range), ProvideX generates Error #21:
Statement number is invalid and halts the MERGE process.
ProvideX terminates the MERGE process when it encounters an End-of-File status in
the source file.
Note: MERGE does not support code generated using the LIST EDIT format.
Example The following is a sample terminal session using the MERGE directive to combine
two programs:
0->LOAD "TIME.PRT"
->LIST
1000 REM Time output routine
1010 T$=STR(INT(TIM)*100+FPT(TIM)*60:"00:00")
1020 RETURN
->SERIAL "WORKFILE"
->OPEN (1)"WORKFILE"; LOCK(1)
->LIST (1)
->CLOSE (1) ! WORKFILE has list of program
->LOAD "PASS.CTRL"
->LIST
0010 GOSUB 1000; PRINT "1st pass: ",T$
0020 CALL "PASS1"
0030 GOSUB 1000; PRINT "2nd pass: ",T$
0040 CALL "PASS2"
0050 GOSUB 1000; PRINT "End both: ",T$
0060 STOP
->OPEN (1)"WORKFILE"
->MERGE (1)
->CLOSE (1)
->LIST
0010 GOSUB 1000; PRINT "1st pass: ",T$
0020 CALL "PASS1"
0030 GOSUB 1000; PRINT "2nd pass: ",T$
0040 CALL "PASS2"
0050 GOSUB 1000; PRINT "End both: ",T$
0060 STOP
1000 REM Time output routine
1010 T$=STR(INT(TIM)*100+FPT(TIM)*60:"00:00")
1020 RETURN
Where:
Example 1:
KEYED "MESSAGE.LIB",10,0,-256
OPEN (1)"MESSAGE.LIB"
WRITE RECORD (1,KEY="NOCUST")"Sorry but Customer %1 is not valid"
CLOSE (1)
MESSAGE_LIB "MESSAGE.LIB"
PRINT MSG("NOCUST","0001")
Sorry but Customer 0001 is not valid
Example 2:
0010 MESSAGE_LIB "*MSGLIB."+ENV("LANG"),ERR=0020;GOTO 0100
0020 MESSAGE_LIB "*MSGLIB.EN"
0100 REM...
0110 ! ...
1000 READ (CST_FN,KEY=K$,DOM=1900)...
1010 ! ...
1900 PRINT MSG("REC_MISS",K$)
Description Use the MNEMONIC directive to define additional mnemonics for files and/or
devices. Once you define a mnemonic for a given logical file number, it stays active
until the channel is closed. When ProvideX encounters a user-defined mnemonic in a
PRINT or INPUT statement, it converts the mnemonic to the character string in the
escape sequence.
Under WindX
WindX supports the use of this MNEMONIC directive via the [WDX] tag. After
opening a channel across a WindX connection, all declared mnemonics (except '*R'
and '*X') are sent automatically to the WindX workstation. ProvideX considers the
'*R' and '*X' mnemonics to be local to the server unless you use the [WDX] tag in
declaring them. ( '*R' declares an operating system command to execute on channel
close, and '*X' declares a program to call on channel close.)
The following is an example of the EXECUTE command under WindX prior to Version
4.20:
For more information, see [WDX] Direct Action to Client Machine, p.795.
Then, a subsequent PRINT 'CP' directive will change the screen font to Courier
New with a size of 8 points. PRINT 'SP' restores the screen font to standard print.
WindX Examples:
0OPEN(chan)"[WDX]\\mach\printer_share"
MNEMONIC(chan)'FF'=$0C$ ! automatically goes to WindX workstation
MNEMONIC(chan)'*R'="erase "+filename$ ! local to server, not workstation
MNEMONIC(chan)'*R'="[WDX]erase "+filename$ ! on workstation, not server
Miscellaneous:
BEEP Send associated sound
TIM=num Maximum time-out value in integer seconds. This
allows message boxes to time-out and close
automatically. The returned value is "TIMEOUT".
TOP or ^ Always on top (forces foreground window)
Description Use the MSGBOX directive to display a window with a message in the middle of the
screen. The text will be split into segments (lines) based on the system settings for
screen width and centring characteristics. You can define multiple lines of text by
using a SEP character between lines. Use the options string to identify the buttons
and/or icons you want to include in the message box. The user's message box button
selection is returned in a string variable.
"t" Supports the use of the Tab key in the multi-line input region.
"T" Strips trailing spaces.
"U" Upper case: converts lower case to upper case automatically.
"X" Signal when focus leaves the multi-line input region.
"Z" Cursor changes to "resize" pointer if within 4 pixels from the edge of the control.
Multi-Line Properties
The Apostrophe Operator can be used with the unique logical identifier (ctl_id) to
dynamically read and alter a wide variety of control attributes (properties) directly
from the programming language. The list of properties available for manipulating a
multi-line control are described in Chapter 7. Control Object Properties.
Description Use the MULTI_LINE directive to create and control a multi-line input region on the
screen. Multi-line input is used to enter or display text. When the input is complete, the
user presses a function key, Tab , or Enter for a single-line high multi-line input field.
ProvideX then generates a control using the multi-line input region's associated ctl_id.
The AutoComplete feature can be included to automatically prompt the user with
previously-entered data. The Calendar feature provides a user-friendly way to enter
date information into a multi-line input area.
Besides translating *mlfile.xx, message #136 can also be changed using the DEF
MSG directive; e.g,
DEF MSG(136)="Supprimer,Coller,Copier,Couper,"
There are no spaces between the items, and the trailing comma is required. If no
popup menu is assigned using MNU=, then the system menu is supplied by the OS,
and the above does not apply.
AutoComplete
When the AutoComplete feature is applied to a multi-line control, it will predict text as
the user is entering it. When the control is accessed, users are prompted with the
previously-entered words/phrases or entries already in a data file as soon as they start to
type. This is a particularly useful tool for applications that require repetitive data entry.
The AutoComplete feature will be disabled when MUTLI_LINE is used for a password
field.
AutoComplete may be set up using the HLP= option as follows:
MULTI_LINE ctl_id, @(col,ln,wth,ht)),HLP="[AutoComplete]parameters$"
Enter the following parameter list (parameters$) separated by semicolons:
AUTOPURGE=YES|NO
Automatically purges expired records. Expired words or phrases
are only purged when the multi-line is accessed. Default is NO.
DATAFILE=path$ Name of keyed file that contains the words/phrases. This file
should be resident and accessible on the local workstation.
EXPIRED=num Number of days a given record will be used before expiry. If this
is not set or set to 0, the words/phrases do not expire.
FIELD=num Field that is being displayed.
KNO=num Key number to be used.
LENGTH=num Maximum number of characters that will be displayed.
OFFSET=num Starting position within the field to be displayed.
PREFIX=string$ Prefix that will be used for searching matching words/phrases.
READONLY=YES|NO
ProvideX does not automatically update the key file when user
enters a new word and/or phrase. Default is YES.
The ’AutoComplete$ property can also be used (wit h the above parameter list); e.g.,
AutoComplete$="DataFile=ProvideX.dat;Readonly=NO".
Note: If the user is going to be using live data that is not supposed to be updated,
ensure that READONLY=YES.
Existing parameters will not be reset unless they are set specifically when the
AutoComplete$ property is set. If you need to reset all parameters in the list, set the
AutoComplete$ property to a null string.
The list of previous multi-line entries is stored in a keyed file that is accessible to the
application. AutoComplete will be based on the internal key of the keyed file and
the key has to be case insensitive for the property to work correctly. If the key is case
sensitive, all lower case keys will be ignored.
Client-Server Behaviour. In this scenario, the file used by the auto-complete logic to
store and/or retrieve data must be on the client machine by default.
If you wish to retrieve data from a rea-only fiile on the server, you must use additional
program logic to accomplish this. First, set the AutoCTL property of the MULTI_LINE
with a ctl_id to be generated when content is needed for loading values in the
auto-complete dropbox. The final character of the list is used as the list item delimiter.
Assign the list to the MULTI_LINE's AutoValue$ property. This will cause the dropbox
to be loaded for selection.
It is also possible to create a list with tab-separated display/return value pairs that
displays the first item of the pair in the drop box, but uses the second item to load the
multi-line when selected. For example, a list consisting of
"12345 - Barry's Bargain Bistro"+$09$+"12345"+$0A$+"12121 -
ABC Company"+$09$+"12121"+$0A"
... would display the following:
12345 - Barry's Bargain Bistro
12121 - ABC Company
... but would load 12345 or 12121 into the multi-line depending on the selection.
For more examples of this feature, see AutoComplete in the User’s Guide, p.156.
Calendar
The CALENDAR feature provides a user-friendly way to enter date information into a
multi-line input area. When it is applied to a MULTI_LINE, a button will be added to the
control that can be clicked to invoke a month calendar popup. This will allow users to pick
a date to be inserted automatically into the multi-line input area. The format of the date
inserted is based on the formatting rules of the DTE( ) Function, p.418. The CALENDAR
feature may be set up using the HLP= option as follows:
MULTI_LINE ctl_id, @(col,ln,wth,ht)),HLP="[Calendar]parameters$"
Enter the following parameter list (parameters$) separated by semicolons:
CALENDAR=YES|NO
YES turns on the calendar support. NO turns it off. Default is NO.
CONTENTS=string$ Text or graph appearing on the button, default is {!DATE}.
DTE=date$ Date formatting rules. Default is based on the DTE( ). Semi-colon
cannot be part of this parameter (if used, the string following
will be ignored). Date code should include % percent; however,
if not used, input will be parsed based on format provided. If a
time formatting string is included, the current time is used.
HEIGHT=num Height of button. Defaults to height defined for MULTI_LINE.
SHOWBUTTON=YES|NO
YES shows the calendar button. NO hides it. Default is YES.
WIDTH=num Width of the button. Default width is equal to the height
defined for the MULTI_LINE; i.e., the default size is a square.
The ’Calendar$ property can also be used (with the above parameter list); e.g.,
Calendar$="CALENDAR=YES;DTE=%Y%M%D;Contents={!Stop}Stop;Width=10".
When invoked, the top left corner of the calendar button will be aligned with the top
right corner of the multi-line input area. If parameters are not specified, the default
graph will be {!DATE} and the width and height of the button equal to the height of
the control itself. Use a keyboard shortcut or mouse click to invoke the calendar:
1. When the multi-line input area or the calendar button has focus, press Shift - F2 . In
this case CTL=-6 is suppressed.
2. When button control has focus, press SPACEBAR or ENTER .
3. Mouse is clicked on the calendar button.
The calendar disappears automatically:
1. When a date is selected and placed in the multi-line input area.
2. When Esc is pressed.
3. When the user clicks anywhere outside the button.
When the button is clicked, no EOM value will be generated, as the button is
considered part of the MULTI_LINE directive and is handled internally. When a date
is inserted into the multi-line input area, no EOM value will be generated unless
OPT="A" has been set and and focus is on the MUTLI_LINE control.
When the MULTI_LINE is hidden or disabled, the calendar button should also be hidden
or disabled, and Shift - F2 will not display the calendar control.
Example:
The following code sample invokes the CALENDAR feature using both methods (via
the HLP= string and the Calendar$ property.
0010 PRINT 'DIALOGUE'(0,0,100,50,"test",OPT="*Z")
0020 PRINT '4D','CS'
0030 LET A=1000
0040 MULTI_LINE A,@(10,10,30,1),HLP="[CALENDAR]CALENDAR=YES"
0050 LET B=1001
0060 MULTI_LINE B,@(10,20,30,1)
0070 LET B'CALENDAR$="CALENDAR=YES;DTE=%Y %Ml %D;Contents=Enter
Date;Width=10"
0080 PRINT "A: ",A'CALENDAR$
0090 PRINT "B: ",B'CALENDAR$
0100 OBTAIN (0,SIZ=1)'ME',A$,'MN',; LET C=CTL; LET E$=HTA(EOM); PRINT
"CTL=",C," EOM=",E$
0110 IF C=4 THEN ESCAPE
0120 GOTO 0100
For another example of this feature, see Calendar in the User’s Guide, p.160.
Format 4: Lock/Unlock
MULTI_LINE {LOCK | UNLOCK} ctl_id[,ERR=stmtref]
Use the MULTI_LINE LOCK or UNLOCK formats to prevent or allow access to the
multi-line input field. Use a LOCK to limit the user's permissions to "view only" for
data such as notes and instructions.
Format 5: Hide/Show
MULTI_LINE {HIDE | SHOW} ctl_id[,ERR=stmtref]
With the MULTI_LINE HIDE format, the multi-line remains active, but is not
displayed. It is still accessible programmatically. Use the SHOW format to restore the
display and user access.
Description Use the MULTI_MEDIA directive to pass commands to the Windows Multimedia
Control Interface (MCI). These strings can contain commands that will play WAV
files, MID files, AVI files or control various multi-media devices. Typical commands
include:
Command Function/Purpose
open filename Opens the specified file and loads the required drivers. You
can append an optional 'alias name' to change the name of
the file and make controlling the file easier.
close filename Closes the specified files and releases the drivers.
close all Stops and closes all files.
play filename Plays the specified file. The file will be opened (if not
already opened), played, and closed automatically.
rewind filename Rewinds the file.
stop filename Stops the playback.
Examples The following examples illustrate the different uses for the MULTI_MEDIA directive.
Example 1:
MULTI_MEDIA "open C:\Documents and Settings\Default User\Application
Data\files\demo.avi alias video"
Example 2:
0010 ! Close all previous Multi_media commands for this session
0020 MULTI_MEDIA "close all"
0030 !
0040 ! Assign an Alias to the Wave file for use in the Play command
0050 MULTI_MEDIA "open C:\WINDOWS\Media\tada.wav alias wavefile"
0060 !
0070 ! Issue the Play command requesting notification of a CTL=100
0080 ! after the wave file has finished
0090 MULTI_MEDIA "play wavefile notify",100
0100 !
0110 ! Wait for the CTL=100
0120 OBTAIN X$
0130 IF CTL=4 THEN STOP
0140 IF CTL<>100 THEN GOTO 0110
0150 PRINT "Multi_media command finished"
Future references to the file could simply use the alias. Two options can be appended
to the play command:
NOTIFY send the CTL value when completed.
WAIT wait for the playback to complete.
If an error occurs during processing, it will be returned in the return$ variable.
Note: Full documentation of all available MCI commands is beyond the scope of this
manual. Refer to other (Microsoft) sources for complete documentation on the MCI
system.
Note: Refer to FOR..NEXT Loop While Incrementing, p.133, for complete syntax.
Description When ProvideX encounters the NEXT directive, the control variable is incremented
or decremented and, if the current value does not exceed the ending value, control is
returned to the directive following the corresponding FOR.
If a variable is used in the NEXT directive, it must match that of the currently active
FOR. If no FOR is active or the variables do not match, ProvideX returns an Error
#28: No corresponding FOR for NEXT. The control variable can be omitted
from the NEXT directive because the increment/decrement of the FOR var is
assumed automatically. However, the NEXT var is useful for readability purposes,
especially if it appears within a nested loop structure.
Description Use the NEXT RECORD directive to end a SELECT directive. As each record is read,
ProvideX processes any logic you include following the SELECT directive up to the
NEXT RECORD. When ProvideX encounters a NEXT RECORD statement with no
records found for a nested SELECT, it will locate the corresponding SELECT
statement.
Example 0010 SELECT IOL=0100 FROM "CUST_FILE",KNO=1 BEGIN "ABC CO" END "NEW CO" WHERE
0010:CITY$="CLARENDON"
0020 PRINT REC(IOL=0100)
0030 NEXT RECORD
0100 IOLIST CUST$,NAME$,ADDR1$,ADDR2$,CITY$,PROV$,POSTAL$,INV_DT$,AMT,TERMS,
0100:DUE_DT$
0110 PRINT "DONE"; END
-:run
123460
ACME LTD.
SUITE 1900
2000 1ST ST.
CLARENDON
ON
K0K0K0
0
chan Channel or logical file number of a terminal or indexed file from which
to obtain input.
fileopt Supported file options (see also, File Options, p.804):
ERR=stmtref Error transfer
HLP=string$ Help message identifier
LEN=num Limit on input size
SIZ=num Number of characters to read (number of screen columns)
TBL=stmtref Data translation table
TIM=num Maximum time-out value in integer seconds
varlist Comma-separated list of variables, literals, mnemonics, IOL= options,
and/or location functions '@(...)'.
Description Use the OBTAIN directive to issue prompts to terminal devices and to process
responses (the user's input). The file reference should be to a terminal, but you can
use an indexed file. If you include literals or expressions in this directive, ProvideX
treats them as prompts for the user.
You can include format masks, as in A$=STR(.01:"0.00"). If you omit the format
mask for a numeric in the OBTAIN statement, 'DP' Decimal Point Symbol and 'TH'
Thousands Separator system parameters are ignored for European decimal settings.
Note: OBTAIN performs in the same way as the INPUT directive except that the user's
input is not echoed on the screen. This can be useful for such applications as
passwords.
The password, "TEST" in this example, is not echoed, but C$ will return the value.
-:?C$
TEST
Format 1. COM Control via OOP Object: ON EVENT FROM com_id PROCESS oop_id
2. COM Control via CTL Event: ON EVENT evtname$ FROM com_id PREINPUT ctl_id
3. Remove CTL Event: ON EVENT evtname$ FROM com_id REMOVE
Where:
com_id Numeric CTL value of a Windows COM object.
ctl_id Numeric CTL signal to generate (preinput) when a given event occurs.
evtname$ Event name, maximum 255 characters.
oop_id Numeric identifier of an OOP object.
Description This directive is used to activate support for individual COM events for use in ProvideX
applications. This is a feature of the ProvideX Event Handling Interface and Component
Object Model (COM), an industry-standard technology used by applications to
expose methods, properties, and events to development tools, macro languages, and
other applications. For complete information on this subject, refer to the document
Automation in ProvideX, available for download from the ProvideX website
www.pvx.com.
Description Use the ON..GOSUB directive to transfer control to a subroutine at one of the
statement references listed, based on the numeric value supplied:
If num is greater than the number of stmtref’s supplied, the last stmtref is assumed.
ON... GOSUB
X <= 0 Transfers to 0100
X = 1 Transfers to 0200
X = 2 Transfers to 0300
X = 3 Transfers to 0400
X >= 4 Transfers to 0500
Description Use the ON ... GOTO directive to transfer control to one of the statements listed
based on the value you provide:
If num is greater than the number of stmtref’s supplied, the last stmtref is assumed.
ON... GOTO
X <= 0 Transfers to 0100
X = 1 Transfers to 0200
X = 2 Transfers to 0300
X = 3 Transfers to 0400
X >= 4 Transfers to 0500
Description Use this directive to open a file or device and assign a logical file (channel) number
to it. The string$ expression can include a specialty filename or file tag; e.g.,
*MEMORY*, [RPC], etc. It may also contain a port ID for direct serial
communication.
You can normally have a maximum of 127 files open at any time in a ProvideX
session (less under some operating systems). In the extended file access mode 'XF'
you can open up to 65000 files, subject to OS limitations.
Note: The actual number of files you can open at any one time depends on operating
system parameters. Consult your system configuration information for details on
how to increase the number of files you can open.
Opening Devices. Use a colon (:) at the end of the string$ to open a port number
directly; i.e., LPT1 and LPT1: are considered to be the same device. For information
on opening devices, see COM Ports and Serial Devices (below).
Special command file tags are used to modify paths and filenames for specific I/O
in ProvideX. These are listed and described under Special Command Tags, p.763.
For information on accessing built-in virtual files, devices, and interfaces using the
OPEN directive, see Special Files and Devices, p.731.
CLOSE, BEGIN, START, STOP, BYE, QUIT, RELEASE, END directives will close
currently-open channels.
For example, the setting$ assigned in the following example are for the serial
communications attributes: baud rate (9600), parity (n=none), data bits (8), stop bit
(1) and flow rate (x=xon/xoff switch).
12540 let setting$="9600,n,8,1,x"
12550 let printer=hfn
12560 open (printer,isz=1,opt=setting$,err=13000)"COM2:"
12570 print (printer)"Title"
Note: If the OPT= option is omitted from the communications settings, ProvideX will
default to the setup in the Windows Control Panel.
WindX Tip. While it is possible to open a serial device on the client PC by using the
[WDX] tag, we recommend against doing this. Instead, we advise you to use a CALL
from the host to a [WDX] subprogram on the remote client PC. Design your
subprogram to open and control the device and its settings. You can return your
results to the host via your CALL's parameters. For more information see [WDX]
Direct Action to Client Machine, p.795.
Note: Under UNIX, /dev/null and /dev/console files are not locked when
opened. However, all other files are.
WindX Example:
00010 BEGIN
00020 PRINT
00030 !
00040 LET in_file$=%wdx$+"D:\DATA\BATCH\R0000188"
00050 LET o_file$="D:\JUNK\TEST\TST_OUT"
00060 EXECUTE "[WDX]ERASE "+o_file$+",ERR=*NEXT"
00070 EXECUTE "[WDX]SERIAL ""D:\JUNK\TEST\TST_OUT"""
Note: WindX supports the use of SERIAL and ERASE commands via the [WDX] tag. It
is not necessary to embed these commands in an EXECUTE directive. (If you are
running a version of ProvideX earlier than Version 4.20 on a WindX PC, you may need
to encapsulate these commands in an EXECUTE "[WDX]..." directive, as in lines
0060 and 0070 above.) See also [WDX] Direct Action to Client Machine, p.795.
00130 LET no_file$="Y"
00140 LET in_file=HFN;
OPEN (in_file)in_file$
00150 LET f$=FIN(in_file)
00160 CLOSE (in_file)
00165 LET pd=POS(DLM=in_file$,-1);
IF pd<>0 \
THEN LET inn_file$=in_file$(pd+1) \
ELSE LET inn_file$=in_file$
00170 LET chars=DEC(f$(1,4))
00180 !
00190 LET blk_size=1024,done$="N",c=0
00200 IF chars<blk_size \
THEN LET blk_size=chars
00210 !
00220 OPEN (in_file,ISZ=blk_size)in_file$
00230 LET o_file=HFN;
OPEN LOCK (o_file,ISZ=blk_size)%wdx$+o_file$
00250 LET cur_byte=0,st_byte=0,se_byte=0
00260 LET r_c=blk_size
00500 ! !500
00510 ! Get Pos Of First ISA
00520 !
00530 READ RECORD (in_file,END=0700)in_rec$
00540 LET l=l+1;
PRINT @(0,5),l
00550 WRITE RECORD (o_file)in_rec$
00555 LET by=by+LEN(in_rec$)
00556 LET tst=chars-by;
IF tst<blk_size \
THEN LET r_c=tst
00590 GOTO 0530
ENTER C$
READ (FILE_NO,KEY=C$) ! Loads all the variables
RETURN 1
!
FUNCTION NEXT()
READ (FILE_NO,END=*NEXT); RETURN 1
RETURN 0!
FUNCTION UPDATE()
WRITE (FILE_NO); RETURN 1
END DEF
!
ON_CREATE:
FILE_NO = HFN; OPEN OBJECT (FILE_NO,IOL=*)"ARCUST"
RETURN
The file is opened in the ON_CREATE. There is no need to worry about closing the file
since ProvideX does it automatically.
For further information, see Object-Oriented ProvideX, p.347 in the User’s Guide.
Description Use the PASSWORD directive to assign/remove passwords to/from programs and
data files.
Important: When encryption is enabled on a data file, all key and data blocks will be
encrypted; therefore, routines that attempt to parse a passworded file in binary mode
will not function correctly. This includes the file recovery utility, *UFAR.
PASSWORD *[,pswd$]
Apply Password Common to all Programs. Use the asterisk * to denote a common
password. ProvideX will apply a common password automatically to all previously
passworded programs when they are loaded and to all new programs.
An internal password queue records passwords for successfully opened files and checks
when an attempt is made to open a passworded file without specifying a KEY= clause or
when a null KEY= value is supplied. The password stored in the queue is used if an entry
exists for that file. The number of entries to keep in the queue is controlled by the 'PQ'
System Parameter, p.676. The ability to distinguish between an invalid password and a
non-existent password is provided by means of the 'PE' System Parameter, p.675.
Due to the fact that all key and data blocks are encrypted, routines that attempt to
parse a passworded file in binary mode will not function correctly. This includes the
file recovery utility *UFAR.
Prompting for Password
ProvideX includes a generic program called get_pswd that will prompt for a
password when KEY= is invalid or missing when a passworded file is opened.
ProvideX checks the existence of the get_pswd program in the *ext subdirectory
first, and then in *ext/system if the former is not found. This feature also allows
the developer to customize the interface. As the prompt will be handled by a called
program, it is also WindX-aware.
An embedded I/O (EIO) processing entry point called Get_Password provides the
ability to prompt the user for a password based on logic associated with the EIO
program. Provided the EIO program is valid and the entry point Get_Password
exists, it will be used instead of the generic *ext/system/get_pswd or custom
*ext/get_pswd. As the file is not in an OPEN state at the point when the entry
point is called, the LFO and LFA values do not contain meaningful information. For
this reason, the name of the file will be passed in the fourth parameter, normally
referred to as Value$.
Examples:
->KEYED "MyFile",[1:1:10],0,0
->OPEN LOCK (1)"MyFile"
->PASSWORD (1)"ABC" REQUIRED FOR OPEN
->CLOSE (1)
->OPEN (1,KEY="ABC")"MyFile"
->WRITE (1)"Record A"
->LOCK (1)
->PASSWORD (1)"XYZ" REQUIRED FOR OPEN
Error #13: File access mode invalid
->PURGE (1)
->PASSWORD (1)"XYZ" REQUIRED FOR OPEN
->CLOSE (1)
->OPEN (1,KEY="XYZ")"MyFile"
Monitoring Attempts
TCB(68) reports the number of attempts which have been made to prompt for the
password. This value is incremented prior to ProvideX calling the embedded I/O or
get_pswd routine so the first attempt will have a TCB(68) value of 1 (one).
By default, the first three attempts to access a passworded file using an invalid
password will result in a prompt to re-enter the password. The fourth attempt
generates an Error #53: Invalid password. This behaviour is controlled via the
'PP' System Parameter, p.676.
Password Error Reporting
The following error conditions will be trapped:
Error #13: File access mode invalid.
Attempt to apply or remove a password when the file is in read-only mode, not
locked, or not empty.
Error #14: Invalid I/O request for file state.
Attempt to apply a password to an un-opened channel.
Error #17: Invalid file type or contents.
Attempt to apply a password to a non-Keyed file or to encrypt a non-VLR
formatted file.
Error #46: Length of string invalid.
Attempt to assign a password longer than 240 characters.
Error #53: Invalid password.
Attempt to open a file using invalid password.
Error #61: Authorization failure.
Password record failed the internal CRC check.
Description The PERFORM directive saves the current program state, then transfers control to a
subprogram. All variables are made common between the initiating program and
the subprogram. When the subprogram terminates, control returns to the initiating
program at the directive following the PERFORM directive.
Note: All variables that are changed or created during execution of the performed
subprogram will be returned to the initiating program.
You can specify an optional entry point in the subprogram. To do this, append a
semicolon and the starting label name (;entry$) to the subprogram name; e.g.,
PERFORM "SUBPROG;STARTING_LABEL". After the subprogram is loaded,
ProvideX internally issues a GOTO directive using the label as a statement reference
and starts execution there. Use this feature to create subprograms to act as "libraries"
(i.e., multiple stand-alone routines, each starting at its own entry point).
The execution of the subprogram is normally terminated with an EXIT, however, the
END or STOP directives may be used in its place.
Format POP
Description Use this directive to pop, or clear, the top entry on the stack. The POP directive
performs the same operation as an EXITTO directive for terminating a FOR/NEXT or
GOSUB operation except that it does not transfer control (to a statement reference),
but continues with the next statement in the execution sequence..
Note: Use the 'POP' mnemonic (not the POP directive) if you want to pop a child
window superimposed on a parent window.
Example ProvideX will generate an Error #28: No corresponding FOR for NEXT if it
encounters a NEXT directive after you POP a FOR loop. In this example, the POP
directive is used to terminate a FOR loop, leaving the GOSUB's RETURN entry on the
stack. (No Error #28 is generated.)
0100 GOSUB SCAN_FOR_IT
...
1000 SCAN_FOR_IT
1010 FOR I=1 TO 1000
1020 IF X$[I]="MOOCOW" THEN POP; RETURN
1030 NEXT
1040 PRINT "NOT FOUND"; RETURN
Description Use the POPUP_MENU directive to create and process floating menus. A popup
menu "pops up" on top of the current window when you right-click the mouse while
the pointer is over a control, such as a button, multi-line, or list box. Once a popup
menu is created and assigned to a control, it remains invisible until the user
right-clicks the mouse button over the enabled component. In a popup menu, a
default option may be specified.
Using Images
Images can be included for each item in the menu. Enclose the image name in curly
braces and place it in the menu definition just prior to the specific item text; e.g.,
"-[&File],F:[&Open=1001,{!Stop}&Stop=1002]"
Use a leading exclamation point (!) to identify the image as internal, or specify the
relative path and filename to access an image file that is external. POPUP_MENU also
supports the use of two-tone effects as described under the MENU_BAR Directive,
p.204. For more information on options available for displaying internal/external
images and the recognized image file types, see Handling Images and Icons in the
User’s Guide, p.398.
Description Use the PRECISION directive to change the number of digits ProvideX maintains to
the right of the decimal point. (Internally, ProvideX makes all calculations using 18
digits of accuracy but when numeric data is output the value is rounded and
returned using the number of digits set in the PRECISION directive.)
The precision setting is also used in conjunction with the ROUND directive. If
rounding is enabled (default mode), values assigned to variables through the LET
directive will be rounded to the PRECISION num specified.
Note: Precision is automatically reset to two (2) by the following directives: BEGIN,
CLEAR, END, LOAD, RESET, STOP, RUN.
The FLOATING POINT directive overrides the PRECISION directive. PRECISION -1
can also be used to have ProvideX switch to floating point (scientific notation). Use
any another numeric value in the PRECISION directive (e.g., PRECISION 2) to
cancel scientific notation. See Object-Oriented ProvideX, p.347 in the User’s Guide.
See Also FLOATING POINT Switch to Scientific Notation, p.132,
ROUND Control Rounding, p.289
PRC( ) Function, p.499
PRC System Variable, p.565
'PD'= System Parameter, p.675
Examples 0010 FOR A=0 TO 6
0020 PRECISION A
0030 PRINT 1/3,
0040 NEXT A
0050 PRINT " DONE"; STOP
RUN
0 0.3 0.33 0.333 0.3333 0.33333 0.333333 DONE
0060 PRECISION 7
0070 PRINT 1/3, @(15),"PRECISION: ",TCB(14)
0080 BEGIN ! Resets precision to 2
0090 PRINT 1/3, @(15),"PRECISION: ",PRC
0100 END
RUN
0.3333333 PRECISION: 7
0.33 PRECISION: 2
Description Use the PREFIX directive to define a series of search paths to be inserted in front of
all relative file references used in OPEN / LOAD / RUN / CALL / PERFORM
directives. (ProvideX opens files with absolute paths directly, without performing a
search.)
Each prefix can contain 0 zero or more search locations. (A search location is either a
directory or a disk/directory pair.) You can specify up to 10 differently-numbered
prefixes (i.e., PREFIX (0) through PREFIX (9)) as well as a PREFIX PROGRAM and
a PREFIX FILE. Descriptions of the various formats are provided below. For more on
Prefix Processing (with examples) refer to the User’s Guide, p.122
Where:
Description Use the PREINPUT directive to have your program prime the input buffer for the
user's terminal with a value. You can issue more than one PREINPUT directive, with
the messages queued. You can also use this directive to have subprograms respond
to INPUT statements in the CALLing or subsequent programs.
Description Use the PRINT directive to format and send printable data to a terminal, printer or
file. This instruction processes mnemonics and positioning information. If the print
statement ends with a trailing comma, the output from a subsequent PRINT directive
will continue on the same line. Otherwise, it will start at the first column of the next
line. If you omit a format mask for a numeric in the PRINT statement, 'DP' Decimal
Point Symbol and 'TH' Thousands Separator system parameters are ignored for
European decimal settings. ProvideX accepts the question mark ? as a substitute for PRINT.
Note: Because of the potential conflict between the function AND( ) and the logical
operator AND, there is a problem when the syntax processor tries to parse the statement
PRINT AND($41$,$42$). As a work around, assign the result of a logical AND to a
temporary variable or change the statement to PRINT ""+AND($41$,$42$).
Where:
arg_1$ ... List of valid arguments for a Panel Object. Optional string
arg_20$ expressions. You can use up to 20 arguments. These arguments are
accessible in the invoked panel as values in the reserved
NOMADS variables ARG_1$ through ARG_20$.
For Query or File Maintenance objects, you're limited to one
argument, the value of which is accessible in the reserved variable
ARG_1$. The others are reserved.
lib Optional. Name of the NOMADS library containing the panel
name. String expression. If you use null (""), NOMADS uses your
currently active library.
panel Name of the NOMADS Panel, Query or File Maintenance object.
String expression.
val$ Starting / return value for a Query. See the examples, below.
Description Use the PROCESS directive to call a NOMADS panel from a program. NOMADS
returns to the program when the panel is exited. You can pass optional arguments to
and from the NOMADS panel.
Note: When you use the PROCESS directive, ProvideX converts the statement internally
into a CALL to *winproc (the NOMADS engine) to process the panel.
Examples The following examples illustrate the different uses for the PROCESS directive.
Panel Example:
In the example below, the ProvideX PROCESS statement invokes the SALES panel
through the program and passes two arguments, SALES_ID$ and
STR(SALES_AMT), to the SALES panel to get the values:
PROCESS "SALES","LIBRARY.EN",SALES_ID$,STR(SALES_AMT)
In the NOMADS Panel Header Pre-Display logic, you would Execute the following
assignments:
SALES_ID$=ARG_1$;SALES_AMT=NUM(ARG_2$)
Query Example:
For queries that are not attached to a NOMADS control object,
0110 PROCESS "MY_QUERY","",X$
When MY_QUERY runs, the value of X$ is used to set the starting position in the file.
When MY_QUERY is exited, NOMADS passes the return value to the calling program
in X$.
Where:
address TCP address and services identifier for the server; e.g.,
"[tcp]192.1.1.100;15000". Alternatives to the TCP address
are explained below.
server Name to be associated with a program server. Length: from 1 to 12
characters; e.g., "INVENTORY".
Description The PROCESS SERVER directive is used to identify a remote program server to a
CALLing application. If desired, "address" can be set to "LOCAL" which results in any
RPC call to this server simply becoming a local CALL directive. Alternatively, the
address can specify a pipe on UNIX, or a DLL on Windows. To terminate the remote
server connection, use the CLOSE keyword.
Where:
Description The PROGRAM directive can be used to create a program file or it can be used in
Object Oriented Programming (OOP) to define a default program name intended to
service an object.
• Whenever an object is created, the system will attempt to call the specified
program at the label ON_CREATE.
• Whenever an object of this class is deleted, the system will attempt to call the
specified program at the label ON_DELETE.
No error is reported if the label does not exist.
In addition, any references to program logic in a property read/write or a method
definition can contain a leading semi-colon. For example, the following class
definitions are effectively the same:
PROGRAM "Cust"
FUNCTION Find(X$) ";LookupByName"
Where:
Description The PROPERTY directive is used in Object Oriented Programming to declare the
properties that can be accessed by the application program. These properties can be
treated like any other variable in the system and are accessible using the
Apostrophe Operator, p.817.
A property name can be followed by a GET label to define the location of the logic to
call whenever the property is read in the application. With GET in place, the
specified logic issues a RETURN value that returns the actual value of the property to
the application;e.g.,
PROPERTY ExtendedAmount GET Extension
...
Extension:
RETURN Quantity * Price
If the logic resides outside of the defining program, then the name of the program
and entry point can be provided in quotes instead.
Note: If the logic required to do a read is simply a formula, then it can be inserted
directly into the PROPERTY definition clause using an equal sign instead of GET; e.g,
PROPERTY ExtendedAmount = Quantity*Price
Specify the SET label to intercept all of the property updates. With SET in place, the
system calls the logic whenever the property is being updated and passes it the
value being set; e.g.,
PROPERTY Quantity SET ChgQty
Like the GET option, an external program/entry point can be provided; e.g.,
PROPERTY Quantity SET "Invline;ChgQty"
Where Invline contains:
2000 ChgQty:
2010 ENTER NewQty
2020 IF NewQty = Quantity then RETURN
2030 ! .. Update inventory.. then RETURN
Use the keyword ERR to prevent the user from being able to GET or SET a property
following the GET or SET declaration;e.g.,
PROPERTY ExtendedAmount SET ERR
If the property contains an object identifier to another object, specify the keyword
OBJECT after the property name. When the object is deleted, ProvideX will use the
REF( ) function against the object identifier to remove it (as long as it has no other
references); e.g.,
DEF CLASS "Customer"
PROPERTY File OBJECT
When you delete an object whose class is Customer, then the system reduces the
reference count of the object whose identifier is in File and, if it is no longer being
referenced, deletes it as well.
For defining properties for an object class that are not exposed to external
applications, refer to the LOCAL Directive, p.197.
Description Use the PURGE directive to erase all data from the file specified. Before you can
execute the PURGE directive, the file must be opened and locked. A file erased using
a PURGE directive still exists in the system but contains no data. (ProvideX returns
disk space to the system while preserving the lock.) Any READ directives for a
purged file return an End-of-File status.
Using PURGE (or REFILE) is faster than deleting the file and recreating it.
Note: Under WindX, you can use EXECUTE "[WDX]..." to encapsulate a directive
that is not supported across a WindX connection. See [WDX] Direct Action to Client
Machine, p.795.
Format QUIT
Description Use the QUIT directive to terminate a ProvideX session and return to the operating
system. If the ERR variable's value is not zero (i.e., an error has occurred) then the
operating system is informed that an error has occurred within ProvideX. This
allows you to do external testing of error conditions.
When you use QUIT in a compound statement, it must be the final directive.
Combined options can be used to create several different button types. The "f", "T",
and "U" options provide the ability to turn buttons into hotspots. This allows for
clickable areas on bitmaps or hyperlinked text in dialogues; e.g.,
"VTf" Creates a general hotspot.
"VUTf" Creates an HTML-like hotspot (e.g., URL hyperlink).
"F^" Creates a word-style toolbar with drop list
Description Use the RADIO_BUTTON directive to create and control a group of radio button
control objects on the screen. A radio button group is a series of related
circular/radio-knob buttons (akin to check boxes) of which only one button can be
active at a time. When a user selects one of the radio buttons, that selection is
activated (on) and all other related radio buttons are automatically reset to off.
Using Images
When adding an image to a radio button, enclose the image name in curly braces.
Use a leading exclamation point (!) to identify the image as internal, or specify the
relative path and filename to access an image file that is external. There are no icons
in the ProvideX executable and ProvideX does not support retrieving icons from
either resource libraries or other system DLLs /executables. For more information on
the options available for displaying internal/external images and the recognized image
file types, types, see Handling Images and Icons in the User’s Guide, p.398.
When you use text as well as images, the relative positions of the image and the text
set their relative placement. The following are example contents$ expressions:
"{!Add}Add" ! Displays the {!Add} bitmap in front of the text "Add"
"Delete{!Del}" ! Displays the {!Del} bitmap after the text "Delete"
If a string expression includes two images separated by a vertical bar inside a single
set of curly brackets, the first will be displayed when the radio button is off (normal
state), the second while the radio button is on; e.g., "{!Stop|C:\MYBMP\Go}.
Format 1: Define/Create
RADIO_BUTTON [*]ctl_id:sub_id,@(col,ln,wth,ht)=contents$[,fileopt]
Use this format to create a radio button. Unlike most other controls, related radio
buttons share the same ctl_id. That is, to group common radio buttons together, you
define each member of the group using the same ctl_id and a different sub_id
(index). When the user makes a selection, other radio button sub_ids in the same
ctl_id group are turned off or lose focus.
The group ctl_id value generates a CTL value whenever any radio button in the
group is pressed and must be unique. Use an asterisk [*] as a prefix for ctl_id to
identify the group of radio buttons as global (not tied to a specific window).
Format 2: Delete
RADIO_BUTTON [*]ctl_id:sub_id[,ERR=stmtref]
Use the RADIO_BUTTON REMOVE format to delete a radio button. By default all
local radio buttons are deleted when a window is removed/dropped or the
application issues a BEGIN. Global radio buttons can be removed manually or cleared
with a START directive.
Format 3: Disable/Enable
RADIO_BUTTON {DISABLE | ENABLE} [*]ctl_id:sub_id[,ERR=stmtref]
Use the RADIO_BUTTON DISABLE format to gray out a radio button and make it
inaccessible to the user. To reactivate it, use RADIO_BUTTON ENABLE.
Format 4: Hide/Show
RADIO_BUTTON {HIDE | SHOW} [*]ctl_id:sub_id[,ERR=stmtref
With the RADIO_BUTTON HIDE format, the radio button remains active, but is not
displayed. It is still accessible programmatically. Use the SHOW format to restore the
display and user access.
Use the RADIO_BUTTON ON format as a logical Push to make it appear that the
radio button image has been pressed. Use RADIO_BUTTON OFF to make it appear
that the radio button image has been released.
Description Use the RANDOMIZE directive to assign a seed to be used by the random number
generator. ProvideX uses the given value to define the starting point for the random
number generator (system variable RND). Use the RANDOMIZE directive to have
ProvideX return a repeatable random sequence.
Description Use the READ directive to read data from the file you identify by channel.
When it's read, the data will be split into one or more fields, either separated by the
currently defined separator character or defined by embedded formats, with the
contents of the first field placed in variable 1, the second field in variable 2, etc.
ProvideX will convert numeric data automatically on a READ statement when
moving it to numeric variables. Numeric data converted during a READ directive
does not use the 'DP' Decimal Point Symbol or 'TH' Thousands Separator system
parameters for European decimal settings.
If you want to skip a field in the record, use an * asterisk as a place holder instead of
a variable name. You can refer to an IOList instead of using a list of variables in
varlist. To do this, use IOL=iolref. The iolref can be a line number or label for the line
containing an IOList, or it can be a string containing a compiled IOList.
If you do not include variables in the READ directive, ProvideX will use the IOL=
option (if you included one) in the OPEN statement for the given file. If varlist
contains more variables than there are current fields in the record, then ProvideX
initializes the additional variables to either zero (for numeric variables) or a null
string (for string variables).
The READ directive will advance the file position to the next record (or, if you use a
KEY= or IND= option, to the record you identify then) and if you use the KNO=
option, the current access key will be changed accordingly.
ProvideX supports use of the READ directive with *MEMORY*.
Description Use the READ DATA directive to read data embedded in a program.
Description READ RECORD reads a record from a file (chan) and returns the complete record's
data portion to the string variable (var). A READ RECORD statement can be used
when dealing with native-mode operating system files, when exchanging data
between ProvideX and other applications, or to read a complete record, including
data field separators.
The READ RECORD directive advances the file position to the next record (or the
record you identify if you use the KEY= or IND= options) and, if you use the KNO=
option, the current key access number will be changed accordingly.
Description The REDIM directive is used to re-dimension an array without destroying data
already contained within the array. All existing data is preserved in the exact same
location within the re-dimensioned array. This directive will work on string or
numeric arrays.
Note: Data in array elements that do not exist in the re-dimensioned array are
discarded.
Description Use the REFILE directive to erase all data in a specified file. If you use the REFILE
directive to erase a file, the file still exists in the system but contains no data.
(ProvideX returns disk space to the system while preserving the lock.) Any READ
directives for the file will return an End-of-File message.
Using either the REFILE or PURGE directive is faster than deleting the file and
recreating it.
If the given filename does not already exist, ProvideX returns an Error #12:
File does not exist (or already exists). If the file is in use by another
user, ProvideX returns an Error #0: Record/ file busy. Unlike the PURGE
directive, the REFILE directive works if the file is not opened.
WindX supports the use of this directive via the [WDX] tag; e.g., REFILE
"[WDX]somefile.ext"... For more information, see [WDX] Direct Action to
Client Machine, p.795.
See Also LOCK Reserve File for Exclusive Use, p.200,
PURGE Clear Data from a File, p.259.
Creating, Deleting, and Renaming Data Files, User’s Guide
Description Use the RELEASE directive to terminate a ProvideX session and return to the
operating system. The numeric value is returned to the OS as a termination value,
allowing for external testing of error conditions; e.g., by the system shell processor or
using a 'C' program.
When you use the RELEASE directive in a compound statement, it must be the final
directive.
Description Use the REM directive to insert program remarks and comments (e.g., documentation
and notes) in a program. The REM statement has no effect on the execution of the
program. ProvideX treats all characters in a statement following the REM directive as
comments. The REM directive is the last one processed in any statement.
Since ProvideX embeds the comment text following the REM directive in the
compiled form of the program, remarks occupy memory space when the program is
loaded and run.
Description Use the REMOVE directive to delete a record from a file. This directive is not
supported for all file types (i.e., not for indexed files). The REMOVE directive and the
specific options are dependent on the specific file type.
Use of the KEY= option for Keyed, Direct, or Sort files is strongly recommended to
identify the record being removed. Otherwise, if the key is not defined, REMOVE
will target the last record requested. The key specified must be the primary key for
the file. With multi-keyed files, ProvideX removes all related alternate keys from the
file automatically when executing this directive.
ProvideX supports use of the REMOVE directive with *MEMORY* (a
memory-resident file or queue of records, Version 4.10).
Description Use the RENAME directive to change the name of an existing file. The first string
must contain the current name of the file. (The file must already exist.) Use the
second string expression for the new name of the file.
When the ‘OR' system parameter is set, the RENAME directive will assume that the
new filename contains a fully expanded OS pathname to the same directory as the
old filename.
If the path is omitted from the existing file name, the standard ProvideX search rules
will apply. If the path is omitted from the new name, the renamed file will be located
in the local working directory.
Restrictions: The new filename must not duplicate an existing filename. You must
have exclusive access to the file you are renaming. ProvideX is subject to OS rules for
the renaming of files.
If an operating system stores files by inode number, it may permit the renaming of
active files because it is the inode that is in use and not the name associated with it.
Other operating systems require that files not be in use before they can be renamed.
Some operating systems do not allow you to rename a file to a different directory.
Note: This directive does not apply to any file segments for a multi-segmented file.
See Also Creating, Deleting, and Renaming Data Files, User’s Guide.
Description The RENAME CLASS directive is used in Object Oriented Programming (OOP) to alter
the name of a previously defined class. This functionality allows the application
designer to alter an existing object class easily, without having to change programs.
Example If you had an existing application with a Product class object but needed to add a
new field to the object, such as Lot_Number:
RENAME CLASS "Product" TO "Orig_Product"
DEF CLASS "Product"
LIKE "Orig_Product"
PROPERTY Lot_Number
END DEF
All subsequent uses of a Product class object would be identical now to the
standard Product class and also have the property LOT_NUMBER.
Description The RENAME CONTROL directive allows graphical control objects to be renamed or
hidden/shown in a single command. Use the second format when changing more
than one control – this format is also intended for faster processing of GUI
functionality when used in a client-server (WindX/JavX) application.
Description The RENAME..INDEX directive allows you to rename, or name, keys. When you
need to modify existing names or add key names to an older Keyed file, use the
RENAME..INDEX directive to change the names.
Description Use the RENUMBER directive to assign new line numbers to the current program.
During the renumbering process, ProvideX adjusts all references to the lines being
renumbered (e.g., GOTO, ERR= option, etc.) to reflect the new line number. By default,
the complete program is renumbered. You can choose to resequence only selected ranges
of the program. All references (GOTO, etc.) are adjusted in either case.
Use embedded REM statements in the program to control renumbering. If a remark
line starts with a number (e.g., 4000 REM 4000), ProvideX uses the number as the
absolute line number (assuming it is less than or equal to the current resequence
number). The LNO( ) function can be used to avoid potential renumbering issues.
Example ->LIST
0001 FOR I = 1 TO 40
0002 READ (1,ERR=18)A,B
0003 PRINT A,B
0007 NEXT I
0010 STOP
0014 REM 100 - Error procedure
0018 EXITTO 0008
->RENUMBER
->LIST
0010 FOR I=1 TO 40
0020 READ (1,ERR=0110)A,B
0030 PRINT A,B
0040 NEXT I
0050 STOP
0100 REM 100 - Error procedure
0110 EXITTO 0045
In line 0110 (renumbered version) ProvideX generated line number 0045 in the
EXITTO statement since no line number 0008 existed in the original version.
Format RESET
Description Use the RESTORE directive to change the position of the data read pointer. When a
program is first loaded (or following a BEGIN directive), the data read pointer is set
to the start of the program. As the data is read, the pointer is advanced through the
various data statements in the program.
To set the data read pointer to a given location, include a statement reference in the
RESTORE directive. Omit stmtref to set the data read pointer to the default position
at the start of the program. ProvideX returns an End of File message when all data
statements in the program have been read.
Format RETRY
Description The RETRY directive returns control to the statement on which the last error transfer
occurred. This allows you to take corrective action and retry the statement. Use
*RETRY to emulate this directive in a statement reference. See Labels/Logical
Statement References, p.810.
If an error occurs on a statement where you have used any of the ERR=, DOM= or
END= options, or where you have used a SETERR directive, ProvideX does the
following:
• Saves the statement number and directive where the error occurred (as a retry address).
• Passes control to the file option or SETERR statement reference to handle the error.
• Returns control to the RETRY directive using the retry address.
You can find the currently saved retry address or line reference in TCB(11). ProvideX
returns Error #27: Unexpected or incorrect WEND, RETURN, or NEXT
(i.e., no return address on an error) if it encounters a RETRY directive with no
previous statement saved.
The saved statement number and directive are cleared by any of the following
directives: BEGIN, CLEAR, LOAD, RESET, START. You can also clear the retry address
by executing a RUN directive with a program name specified.
When you use it in a compound statement, the RETRY directive must be the final
directive. If 'RR' is set, ProvideX also performs a reset for RUN directives.
Description The RETURN directive is used to terminate a subroutine. This directive can also be
used to pass a value back from a multi-line function, an embedded I/O procedure, or
OOP method logic.
Description Use the ROUND directive to control the automatic rounding of values during
calculations. If you use the ROUND ON directive, ProvideX will round all values to
the PRECISION currently in effect before assigning them to numeric variables. The
ROUND OFF directive terminates the rounding process. With ROUND OFF, ProvideX
maintains all values at full 18-digit precision. The ROUND directive has no effect if
FLOATING POINT mode is active.
Rounding Control
The unpredicable rounding of numeric values can cause problems during execution.
It is very important to know how rounding works in ProvideX. If rounding is set to
the default, a divide operation in ProvideX will maintain the precision of the starting
value; e.g., 1014.475/100 becomes 10.14475 which gets rounded to 10.145.
The automatic rounding of intermediate results can be turned off by setting the 'NR'
System Parameter, p.672. Various other types of rounding can be controlled using
the 'RN'= System Parameter, p.680.
Description Use the RUN directive to start or resume the execution of a program. You can include
the name of a program to LOAD and then RUN. The RUN directive performs the
following actions if a program is already loaded:
1. Resets the current precision to 2.
2. Enables rounding.
3. Clears FOR/NEXT, GOSUB/RETURN, and WHILE/WEND stack.
4. Resets SETERR and SETESC addresses and any saved RETRY address.
If you are loading a program or if the current program has not been interrupted,
ProvideX begins execution at the program statement with the lowest line number. If
the current program was interrupted (by an error, or a BREAK or ESCAPE directive)
ProvideX resumes execution from the statement where the program left off.
You can embed the RUN directive in a program to provide an overlay facility. The
RUN directive affects neither user data nor files. When you use it in a compound
statement, the RUN directive must be the final directive.
You can assign an optional line label entry point for the RUN program. To do this,
append a semicolon and the starting label name to the program name (e.g., RUN
"PROG;STARTING_LABEL"). After the program is loaded, ProvideX internally
issues a GOTO directive and starts execution at the assigned entry point.
If you set 'RR', ProvideX will also perform a reset for RUN directives.
Description Use SAVE to copy/write the current program to a given prog_name$. (Include the path
name if the directory is neither current nor in your PREFIX definition.) If the file does not
exist, it will be created. If prog_size is included, the file must not already exist.
If the output of the file is a program file type, ProvideX writes it to the file in internal
(compiled) format. For serial/indexed file types, ProvideX writes the program in
display (LIST) format. SAVE can only be used for serial, indexed, and program files.
Note: You can RUN, CALL, or PERFORM text files that contain programs just as you
would any regular program file.
Structured Save. The SAVE directive can also be used to verify modified programs for
structural integrity ('SS' System Parameter, p.684). Logical errors (e.g., a FOR with no
corresponding NEXT or a SWITCH without an END SWITCH) will result in a Warning
#125: Improper Structure Detected indicating where the fault was detected.
For more information on logical structures, refer to the User’s Guide, Chapter 3.
See Also SERIAL Create a Sequential File, p.298
Description Use the SAVE CONTROL directive to capture graphical controls or the ProvideX desktop
and store the results in a bitmap (.bmp) file. These saved images can then be used by the
'PICTURE' mnemonic. This command will not work on invisible objects/windows.
As most of the functionality is controlled through Windows API calls, it is possible to
receive an Error #15: Operating system command failed if the operating
system is unable to execute the necessary functions.
Note: In a WindX environment, the SAVE CONTROL directive is passed to the WindX
client, therefore filename must be a file on the WindX client, not on the server.
Example 00010 ! SAVE.CTL - Create a Chart then save Control & Screen images
00020 PRINT 'CS','FONT'("MS Sans Serif",-12),'GF',
00030 !
00100 ! ^100 - Create the Chart
00110 Chrt=100; CHART Chrt,@(20,0,40,20),SEP=",",FMT="3DColumn",FNT="Verdana"
00120 CHART LOAD Chrt,"2,3,4,5,6,7,8,9,10,11,12,13/1,2,3,4,5,6,7,8,9,10,11,12/"
00130 Chrt'Title1$="Title 1",Chrt'Title2$="Title 2",Chrt'Footer$="Footer"
00140 Chrt'XAxisTitle$="X-Axis Title",Chrt'YAxisTitle$="Y-Axis Title"
00150 Chrt'CurrentSet=1,Chrt'CurrentPoint=0,Chrt'LegendText$="Item #1"
00160 Chrt'CurrentSet=2,Chrt'CurrentPoint=0,Chrt'LegendText$="Item #2"
00170 Chrt'PointText$="Jan,,Mar,,May,,Jul,,Sep,,Nov,,"
00180 !
00200 ! ^100 - Save the images
00210 SAVE CONTROL Chrt TO "Chart.bmp",ERR=*NEXT
00220 SAVE CONTROL 0 TO "Screen.bmp"
00230 !
00300 ! ^100 - Print the saved images
00310 OPEN (1)"*winprt*;asis"
00320 PRINT (1)'PICTURE'(@X(0),@Y(0),@X(70),@Y(24),"Chart.bmp",2),
00330 PRINT (1)'PICTURE'(@X(0),@Y(25),@X(70),@Y(49),"Screen.bmp",2),
00340 CLOSE (1)
00350 END
Description This directive creates a Variable Definition file on disk that contains the names and
values of variables named in varlist. These variables and their values can then be
loaded into memory using the LOAD DATA directive. Variables loaded in this way
are read-only (constants). Global variables are not supported.
To change the values of variables in a Variable Definition file, you must repeat the
SAVE DATA process. When a Variable Definition file, is re-saved, the original
contents are replaced.
START
DUMP
! ERR=0, CTL=0, RET=2
! Level=1
! PGN="<Unsaved>"
! Loaded data....CO_DATA (C:\Documents and Settings\Default
User\Application Data\CO_DATA)
COMPANY$="ABC Company"
DIVISION$="Laundry Division"
COMPANY_CODE=1
COMPANY_CODE=2
Error #61: Authorization failure
Description Use the SAVE FILE directive to save an image written to *BITMAP* (virtual file)
directly to a bitmap file (.bmp) file on disk.
Note: This capability is for Windows only. The bitmap chan can be a
WindX-connected file if the pathname contains a "[WDX]" prefix. Also, if the pathname
contains "[WDX]" then the chan must be a WindX file.
Example In the code below, *BITMAP* is used to capture ProvideX internal bitmaps, which
are then saved to .bmp files using SAVE FILE:
0010 PicList$='picture'(*)+","
0020 x=pos(","=PicList$); if x=0 then stop
0030 f$=PicList$(1,x-1),PicList$=PicList$(x+1)
0040 open (1)"*bitmap*;Width=1;Length=1"
0050 print (1)'picture'(0,0,@x(mxc(1)+1),@y(mxl(1)+1),"!"+f$,4),
0060 f$="/tmp/"+f$+".bmp"; erase f$,err=*proceed
0070 save file (1) to f$
0080 close (1)
0090 goto 0020
Description Use the SELECT directive to open, read and query records FROM the specified data file,
or just to read data from a specified file number. As each record is read, ProvideX
processes any logic you include following the SELECT directive up to the NEXT RECORD.
When ProvideX encounters a NEXT RECORD statement with no records found for a
nested SELECT, it will locate the corresponding SELECT statement.
If you include a WHERE clause, ProvideX will process only those records WHERE the
condition is true.
The use of BEGIN and END will restrict the range of records read. These clauses are
are only supported for Keyed and Memory files. They can be used with
WindX-connected files. Note that, if you are using BEGIN and END in SELECT
statements for files with descending keys, the END value must be lower than the
BEGIN value.
If a SELECT directive specifies a filename$, that file will be opened when the SELECT
is executed, thus setting the file pointer to the beginning of the file. If the directive
uses a channel, SELECT will begin from the current file pointer. When using the
latter, it may be prudent to include a BEGIN clause to reset the file pointer; e.g.,
SELECT * FROM 1 BEGIN "".
Note: Every SELECT must have a corresponding NEXT RECORD directive, and must
be in the correct sequence. A mis-matched number of SELECT and NEXT RECORD
directives can result in either an Error #27: Unexpected or incorrect WEND,
RETURN, or NEXT, or an Error #28: No corresponding FOR for NEXT.
Because ProvideX pads descending keys to their full length with $FF$, the BEGIN
value is key$+$FF$ and the END value should be key$+$00$ so that the ending key
is less than the beginning key; i.e., the correct format is currently SELECT * FROM
filename BEGIN key$ END key$+$00$.
Although the incorrect statement SELECT * FROM filename BEGIN key$ END
key$+$FF$ may have worked in prior versions, it no longer does as of Version 4.20.
You must either include a NEXT RECORD directive to end the SELECT loop or
instruct ProvideX to exit the loop early (with an EXITTO directive).When an EXITTO
directive is used, the file will be closed if SELECT specified a data file name rather
than a channel.
Also, in earlier versions of ProvideX, the CONTINUE and BREAK directives (and
corresponding *CONTINUE and *BREAK labels) were not supported for use with
SELECT .. NEXT RECORD directives. It is now possible to include BREAK and
CONTINUE commands in SELECT structures.
Note: When SELECT * FROM filename BEGIN key$ END key$+$FE$ is encountered
when processing a MySQL table, the SQL sent to the server will be optimized to reduce
records processed by the server.
In the following example, SELECT KEY is issued to return the key portion of the
record:
SELECT KEY cst_name$,REC=X1$ FROM "cstfile",KNO=1 BEGIN StartName$ END
StartName$+$FF$ WHERE x1.cst_name$<>SkipName$
PRINT x1.cst_name$
NEXT RECORD
This uses the SELECT RECORD directive to return the full record contents:
SELECT RECORD r$ FROM "cstfile",KNO=1 BEGIN "D" END "D"+$7F$
PRINT r$
NEXT RECORD
Description When you use the SERIAL directive to create a serial (sequential or flat) file, ProvideX
creates a standard text data file in a format the operating system can access directly. The
record size is "for documentation purposes only" on most operating systems. If you do
specify the size, make it large enough to hold all the data fields written to the file for each
record. If a file of the name you use already exists, ProvideX returns an Error #12:
File does not exist (or already exists).
OPEN(chan,ISZ=1) sets binary access mode with the contents of the file being
considered a series of 1-byte records. An OPEN(chan,ISZ=512) sets binary mode
with a series of 512-byte records.
A READ or READ RECORD will read the ISZ= number of bytes and treat these as a
record. Using an IND= moves the current file pointer to a specific record, so when
using ISZ=1, the IND= will take you to a specific byte offset within the file.
WindX supports the use of this directive via the [WDX] tag; e.g., SERIAL
"[WDX]somefile.ext"... For more information, see [WDX] Direct Action to
Client Machine, p.795.
Examples Both examples below create files whose structures are viewed by ProvideX as serial
(or unknown type):
0010 SERIAL "PRNTFL",,133
0010 SERIAL A$+"-"+B$,100,50,ERR=1090
See Also Labels/Logical Statement References, p.810
'NN' System Parameter, p.672,
LOAD Read Program into Memory, p.194,
SAVE Write Program to File, p.291.
Data Files, User’s Guide
Description Use the SET_FOCUS directive to set the focus on the custom control you want to
receive the next user input. ProvideX returns Error #65: Window element
does not exist or already exists if you use SET_FOCUS for a non-existent
control item. An Error #13: File access mode invalid is returned if the
control is disabled.
Format 2: Retry
SET_FOCUS RETRY ctl_id
Use the SET_FOCUS RETRY format to set an internal "modified" flag on the control. If
the user attempts to Tab away from the control, it will retry its associated CTL
event. You can use this in input validation (i.e., when an application detects invalid
input). You can issue a SET_FOCUS RETRY directive to have ProvideX reprocess the
input field whether the user changes something or attempts to Tab away from it.
Where:
buffers Number of internal key I/O buffers. Numeric expression.
Description Obsolete.
Note: This directive is included here for completeness only. SET_NBF is obsolete and
has been replaced by the 'BF'= System Parameter, p.653.
Use the SET_NBF directive to adjust the number of internal buffers to be used by the key
I/O manager. Use values in the range 0 to 25. By allocating more buffers, you can
typically obtain better Keyed access performance. Normally the default of 10 buffers
yields good overall performance. If you use the 'BF' parameter to set the number of
buffers to zero, this will force ProvideX to allocate local or file-specific buffers (controlled
by the parameter ‘FB').
Using this directive to optimize system performance takes a great deal of experience.
Many factors influence the number of buffers required. The system may slow down if
too many buffers are assigned, causing excessive queue searching. Too few buffers may
cause additional disk I/O’s. In a single user environment, more buffers will typically
improve performance, since ProvideX will use these buffers to cache disk reads and
writes.
Description Use the SET_PARAM directive to set system parameters. These parameters set
internal options in ProvideX. For the list of possible parameters that can be set, see
Chapter 6. System Parameters.
You can find the current value or state of these parameters using the PRM( ) function
and the system variable PRM.
Description When ProvideX executes the SETCTL directive, it intercepts CTL values on INPUT
statements and transfers control via a GOSUB to the specified line number or label.
On completion of the subroutine (e.g., on a RETURN) control will pass back to the
INPUT statement where the event was intercepted.
To reset a SETCTL, set stmtref to 0000. If stmtref = 0000, the logic to intercept the CTL
value is deleted.
Note: SETCTL is only valid for the program it was executed in, not any subsequent
programs (e.g., those initiated through CALL, PERFORM or RUN directives).
Description Use the SETDAY directive to set or change the current local processing date for the
current user and session (returned in the DAY variable). The DAY_FORMAT of the
string-expression is the default, MM/DD/YY, unless you specify a different setting in a
DAY_FORMAT directive. ProvideX will continue to update the altered date based on
the current time and date.
The altered date will stay in effect until the end of the session or until the execution
of a START directive. Then ProvideX reverts to the operating system's current date.
Note that this directive calculates an offset from the current operating system
date/time. If the operating system date is altered after the execution of the SETDAY
directive, a corresponding change will be reflected in the value of DAY.
Note: This directive only affects the user executing the directive.
Description Use the SETDEV directive to make dynamic changes in the value of the DEVICE TYPE
field maintained by ProvideX for device files. This directive is applicable primarily
to device drivers, and then only those that can support more than one device type on
the same port.
When you use this directive, the device driver '*DEV/DIAL-UP" changes the device
type field for a dial-up terminal based on the type of terminal actually connecting to
ProvideX.
Description Use the SETDEV IOL= directive to alter the various IOLists associated with a
currently open channel. This will override the current IOList definition for a channel
while the channel is open, and will not physically alter the file.
Description Use the SETDEV KEY directive to either assign or alter named keys for an open
channel. The name assigned to any given key is only valid while the channel is open,
and will not physically alter the file.
Description The SETDEV PROGRAM directive allows an Embedded I/O program to be attached
to an open channel if the file does not already have one associated with it. The
embedded I/O program will remain in affect only until the channel is closed.
Example ->load"Embedded.io"
->list
0010 ! Embedded.io
0020 Pre_Close:
0030 PRINT "This message generated by the Pre_Close routine"
Description The SETDEV SEP= directive allows an application to change the standard field
separator character on a file-by-file basis. If the value of char$ is longer than 1
character, the system will generate a string length error. If the value of char$ is null,
the file will be set to have dynamic separators (length delimited).
Note: This only affects the currently opened channel and does not physically alter the
field separator value stored within the file header – it reverts back to its original value
when the file is subsequently opened. This is applicable to native ProvideX files only.
Description Use the SETDEV TSK( ) directive to add a string to the end of the internal table for the
TSK( ) function. Each time SETDEV TSK( ) is used, the task$ is evaluated and appended
to the internal table.
Do not include a task number in the SETDEV TSK( ) directive. ProvideX automatically
supplies the next available number in sequence. The order of the table is determined by
the order in which SETDEV TSK( ) directives are executed. ProvideX places the string
from the first SETDEV TSK( ) into TSK(0), the second into TSK(1) and so on. If you use
the TSK( ) function with an invalid task number, ProvideX returns an Error #41:
Invalid integer encountered (range error or non-integer).
Note: This directive only functions with PVX for Windows, and is used primarily in
the conversion from legacy DOS-based Business BASIC languages.
Description Use the SETDRIVE directive to change the default disk drive.
Description Use SETERR to define the transfer address for any error for which you have not used the
ERR= option. While a SETERR is in effect, any error (divide check, subscript range error,
etc.) transfers control to the statement number, label, or program specified in SETERR. To
disable the SETERR transfer in a program, use statement number 0000 as stmtref.
Once a SETERR transfer occurs, ProvideX inhibits further SETERR transfers until either
another SETERR is executed or a RETRY directive re-executes the statement which caused
the error. This prevents system looping caused by errors in an error handler.
The chart below shows the order of precedence for error handling:
ERR= Error trapping at the line level
SETERR stmtref General error trapping within a program
SETERR "prog;entry" General error trapping for the current session. Entry point is optional.
... else ... Drop to the console and report the error (provided the 'XT'
parameter is disabled).
ERROR_HANDLER READ can be used to determine the current ERROR_HANDLER or
SETERR program in effect.
See Also ERROR_HANDLER Define Generic Handler, p.120
Error Handling and Debugging in the User’s Guide, p.56.
If you use SETESC ON, ProvideX recognizes the user's Ctrl - Break input and halts
execution. If you apply a SETESC OFF directive in your current session or program,
ProvideX treats the user's subsequent use of the break keys as equivalent to a
carriage return or Enter . That is, the user's Esc key or Ctrl -C terminates the current
input (e.g., by advancing to the next input) but does not let the user halt a program
in Execution mode from the keyboard. A Ctrl - Break retries the current input but
does not halt program execution.
If you use SETESC ON, ProvideX recognizes the user's Ctrl - Break input and halts
execution.
Example:
0010 SETESC BREAK_IT
0020 DATA 1,2,3,"CAT"
0030 DATA 4,5,6,"DOG"
0040 DATA 7,8,9,"PIG"
0050 DATA 3,2,1,"DONE"
0060 READ DATA A,B,C,X$,ERR=0110
0070 PRINT A,B,C,X$
0080 INPUT "Try to break out: ",Y$
0090 GOTO 0060
0100 BREAK_IT: PRINT "That was easy."; STOP
0110 PRINT "Error on the READ (EOF)"
0120 STOP
Results when run under Windows with SETESC ON, then SETESC OFF:
The SETESC {ON | OFF} directive is in effect for the duration of the session or until
you reverse it with another SETESC {ON | OFF}.
Description Use the SETFID directive to make dynamic changes in the value returned by the FID( )
function. Any open channel may have its FID value changed. If chan is not provided, it
defaults to affect channel 0. This is most commonly used to change the FID value of
channel 0 (i.e., the terminal) for legacy applications that require unique FID values.
By default, ProvideX uses the value of the operating system environment variable
PVXFID0 as the value for FID(0). If this environment variable is not defined, ProvideX
will dynamically assign a value starting at T0 (T zero).
Example In this example, the value in the WHO system variable is something like "SMITHJ":
0010 ! START_UP
0020 OPEN (1)"MYCONFIG"
0030 READ (1,KEY=WHO,ERR=0050)X$
0040 SETFID X$
0050 CLOSE (1)
The following example defines a unique session and terminal FID in a Windows
environment, given a directory called C:\Program Files\Application\FIDS with
the files "T5", "T5", "T6", "T7", "T8", and so on. (This could also be done with
terminal IDs of 3 characters or more.)
In a START_UP program,
0010 OPEN (1) "C:\Program Files\Application\FIDS"
0020 READ (1,END=1000) ID$
0030 IF ID$(1,1)="." GOTO 0020 ! Skip "." and ".."
0040 %FID_FILE=GFN
0050 OPEN LOCK (%FID_FILE,ERR=0020) PTH(1)+DLM+ID$
0060 SETFID ID$
0070 CLOSE (1)
....
1000 MSGBOX "Sorry. No free FID for this station. End another session & try again"
1010 QUIT
This logic will open and leave open a file pertaining to the station FID. Once the task
ends, the file will be available for another session.
Description Use the SETMOUSE directive to define and control mouse events. By default, the
mouse events are tied to the current window only. The SETMOUSE directive now
supports fractional coordinates to two decimal places.
Note: Only a single SETMOUSE directive can be active for the same region at any time.
Example:
0010 REM Return CTL=4 when mouse released on line 20 in columns 0 through 5
0010 SETMOUSE ON
0020 PRINT 'CS',@(0,20),"[Quit]",
0030 SETMOUSE @(0,20,6,1)=4
0100 INPUT @(10,10),"Enter name:",X$
0110 IF CTL=4 THEN GOTO 9000 ! Wrap-up
Description Use the SETTIME directive to set or change the current processing time (returned in the
TIM, TME, and TMS variables). The value of time must be between 0 and 24 (the desired
time of day based on a 24 hour clock). Once set, the time will be continuously updated
based on the operating system clock.
ProvideX will continuously update the date and time based on the set time until the end
of the session or until the execution of a START directive. Then, ProvideX reverts to the
operating system's time.
Note that this directive calculates an offset from the current operating system date/time.
If that date/time is altered after the execution of the SETTIME directive, a corresponding
change will be reflected in the values of TIM/TME/TMS.
Note: This directive only affects the user executing the directive.
Description When you use the SETTRACE directive, ProvideX lists all statements as they are
executed until an ENDTRACE is encountered.
The END and STOP directives halt tracing. Tracing is suppressed during the
execution of a password-protected program.
When tracing, ProvideX lists the statements either to the terminal or to a file (if you
designate a channel in a SETTRACE directive). If you use a file, you have to open it
first and if it's a serial file, you have to lock it.
It can be confusing if an error occurs in the output/trace file, since the error will be
reported as an error for the current statement being traced, which itself may not be
in error.
See Also ENDTRACE End Trace Output, p.117.
Format SHORT_FORM
Description Use the SHORT_FORM directive to have the compiler input-parsing accept only short
variable names (emulation/compatibility mode). Its complementary directive is
LONG_FORM which allows long variable names.
Programs can be written in either SHORT_FORM or LONG_FORM or in a combination
of both and can run in either mode.
Example SHORT_FORM
-:ABCDE$="ABCDE$ IS NOT OK"
Error #20: Syntax error ...BCDE$="ABC... (Long variable name not accepted)
-:A$="A$ IS OKAY"
-:LONG_FORM
-:LONG_NAME$="LONG_NAME$ IS OK"
-:
Description Use the SHOW directive to re-display a given hidden control object so that the user
can see it and the program can set the focus on it.
(The HIDE directive hides a control from display. While the control is hidden it is still
active for the purposes of reading/writing but the user cannot see it, nor can the
program set focus on it.)
Description Use the SORT directive to create a data Sort file (a file with a key but no data record
portion). You must include the size of the key along with the name. The maximum
Sort key size allowed is 127. If the given filename already exists, ProvideX returns
Error #12: File does not exist (or already exists).
The type of file created can be determined by setting the 'KF'= System Parameter,
p.667. If 'KF' is not zero then the Sort file will be created as an EFF file. Only through
use of the 'KF' parameter will Sort files be created as EFF files
WindX supports the use of this directive via the [WDX] tag; e.g., SORT
"[WDX]somefile.ext"... for more information, see [WDX] Direct Action to
Client Machine, p.795.
Examples 0010 SORT "CSTFLE",6,100 creates a file with the following structure:
Keyed file: C:\Program Files\Sage Software\ProvideX\CST\CSTFLE
Maximum Record size ..........: 0 (Sort file)
Maximum # records ............: 100
Current # records ............: 0
Size of key block ............: 2048 bytes
External key size ............: 6
0010 SORT A$+"_"+B$,10,100,ERR=1090 creates the following structure:
Keyed file: C:\Program Files\Sage Software\ProvideX\CST\CST_TST
Maximum Record size ..........: 0 (Sort file)
Maximum # records ............: 100
Current # records ............: 0
Size of key block ............: 3072 bytes
External key size ............: 10
Description Use the START directive to re-initialize the current session or to launch a completely
new session. START can be used to specify the maximum amount of memory to be
allocated to the user and optionally the program to LOAD and RUN. If you omit the
memory size, ProvideX uses the current memory limits.
Note: Use of the START directive causes a session to disconnect if ProvideX is running
under WindX over a client-server connection.
Description In Object Oriented Programming (OOP), the STATIC directive is used to create
variables for use within an object at runtime — basically, STATIC is used to extend
the list of LOCAL properties. This allows for the dynamic creation of variables which
are visible to operations within an object, yet which are not directly accessible to
outside code; e.g.,
STATIC A$,B, IOL=IOL(1)
All the named variables will be LOCAL so that their values will remain current while
executing logic within the object.
Using the STATIC clause, an object that is accessing a data file with an embedded
IOList will be able to handle extensions to the IOList going forward. This allows the
object to then read a record from the file and have the data elements remain available
for subsequent calls to the object's methods.
Duplicate variables are ignored; i.e., if a variable has already been declared STATIC,
is a PROPERTY, or has been declared LOCAL for an object, then no error is reported.
Static variables will include their associated arrays; therefore, STATIC A$ also
means that A$[1],... are all static.
Note: Ensure that the STATIC declaration occurs before the variables are used - static
variables will only take effect on references that follow their declaration.
Format STOP
Description Use the STOP directive to halt the currently running program. If the current program
is a subprogram, then control is immediately passed back to the calling program.
Otherwise all open files are closed, a RESET operation is performed, and the next
location counter is set to the start of the program.
If an application is invoked directly by an operating system command that specifies
a lead program, then the STOP directive performs the function of a QUIT and
automatically returns the user to the operating system. If the application is RUN
from Command mode, ProvideX returns to Command mode.
When you use the STOP directive in a compound statement, it must be the final
directive. (Exception: A remark can follow the STOP directive.)
The END directive is functionally identical to the STOP directive.
Format SWITCH expression CASE range_1 [...CASE range_n] [BREAK] [DEFAULT] ..END SWITCH
Where:
CASE range_1.. List of string or numeric values for comparison with expression,
CASE range_n used to define a branch point.
BREAK Optional directive defining immediate exit from the CASE structure.
DEFAULT Optional directive defining a default branch point should no
matching CASE be found.
END SWITCH Directive required to end branching sequence.
expression String or numeric expression to test for branching to subsequent
CASE statements.
Description The SWITCH directive defines an expression that will direct control to one of multiple
branch points. The results of the SWITCH expression is compared with values in each
CASE statement to determine a branch. If a match is found, execution continues with
statement(s) after the matching CASE (until the next BREAK or END SWITCH). If there are
no matches in any of the CASE statements, control falls through to the DEFAULT clause (if
present), and the statements that follow are executed automatically.
Note: Since branch controls are maintained on the stack, you must not break within
another stacked context. When ProvideX encounters EXITTO or RETURN within the
scope of a SWITCH, it removes the current FOR/GOSUB/WHILE/REPEAT entry from
the stack, but does not exit the SWITCH.
Note: This directive only functions in Windows or with the WindX terminal driver.
When using WindX, the help file must be resident on, or directly accessible to, the
remote workstation.
Use this format to invoke the standard Windows Help system and CHM-based Help
files. Help files must be created in accordance with the Windows standard.
Indicate the key to start with in the Help index. (Optional.) If a partial key (?) is
used, the Help subsystem tries to find the entry in the Help index that most closely
matches it. If the first character is a # then the key is considered the Help index for
the file. If it is neither ? nor #, the key must be an exact match for an entry in the
Help index.
Example:
1000 INPUT "Enter customer ID:",C$
1010 IF CTL=1 THEN SYSTEM_HELP "OENTRY.HLP","Client"; GOTO 1000
SYSTEM_HELP allows you to use files other than those with a .HLP extension.
ProvideX passes these directly to the Windows Shell command for processing,
allowing Windows to apply normal file associations to automatically launch the
appropriate application.
Preface the second argument with a # and append it to the first argument for URL
handling; e.g.,
SYSTEM_HELP "http://www.pvx.com/support.htm","mymark"
would be http://www.pvx.com/support.htm#mymark.
Passing this to SYSTEM_HELP will automatically launch the default browser (if any)
and jump to the web page requested.
If this format is used, the text following the single quote in the Help message is
displayed in a popup Help box; e.g.,
Description Use SYSTEM_JRNL to have ProvideX log all updates to specified data files.
D Delete record
E Erase file
P Purge file
U User transaction
2-4 Record size in bytes
5-8 Time of day when record was written in seconds past 01/01/1970 GMT
9-12 Address of prior record for session
13-16 Address of related record; e.g., After/Before image points to file Open
record. Open file record points to User login record
The remainder of the record is the before/after image of the data. The file itself has a
four-byte header with the address of the last record on the file. Individual entries
written to a journal file are linked together by their prior and related record addresses.
The first record in a session will start with an O record type (SYSTEM_JRNL OPEN).
This record contains addition information including the user ID (WHO/UID) and the
FID(0) value separated by a ; semicolon. Closing a journal file will generate a C
record which links back to the original O record for the session.
Any files opened during the session will be written as an o type record which will
contain a prior record address that links back to the start of the session (or the O
record). Closing or updating a file (c, A, B, D type records) will link back to the file
open entry (o record) to identify which file the update pertains to.
Additional data contained within an A, B or D type record is broken down as follows:
Byte 1 Length of the key/index value which follows immediately,
padded with $00$ to the full length of the key definition (use
asc(data$(1,1)) to determine the length)
Bytes 2,n The actual key/index value
Bytes 2+n,2 Length of the data itself (use dec($00$+data$(2+n,2)) to
retrieve the length)
Bytes 2+n+2,x The actual data
Tracking Files
Each tracking file (log) is created with a unique name using the following format:
username.MMDDHHMMSS.log
Where:
username Name for the session. In the case of client-server applications, the
workstation name (if present) or IP address will be used,
otherwise the user name for the host process will be used. No
attempt is made to determine the true workstation end-user
name – only the workstation name, as returned from the socket's
'GetPeerName' function, will be used.
MMDDHHMMSS Date and time that the log started.
The tracking file contains a list of all the data files that have been physically updated
and not yet closed by the ProvideX process. Every time a file has an update issued
against it, the system will add the pathname to the tracking file. Each line will be
separated by a standard (OS dependant) end-of-line sequence.
Multiple occurrences of the same file may exist in the tracking file as entries are
maintained based on open channels.
The tracking file is updated to indicate when a file is being updated prior to the
execution of the WRITE or REMOVE directives. When a file that was logged is closed,
its entry from the log file will be removed.
To help ensure that the contents of the tracking file are accurate, ProvideX will close
the tracking file after each write.\
Note: Only Keyed files (EFF, VLR and FLR) and Indexed files are tracked.
The following illustrates use of the SYSTEM_JRNL for tracking potential file
corruption (dirty file indicator):
Dir$="/SysJrnl.Dir/"; DIRECTORY Dir$,ERR=*NEXT
WorkFile$="WorkFile.Dat"; KEYED WorkFile$,10,0,-256,ERR=*NEXT
!
! Generate a log file
SYSTEM_JRNL DIRECTORY Dir$
OPEN (UNT)WorkFile$; WorkFile=LFO
WRITE (WorkFile,KEY="Test")"Test","Record"
!
List$=""
SELECT Log$ FROM Dir$ WHERE POS(".log"=Log$)
SELECT File$ FROM Dir$+Log$
IF POS(File$+SEP=List$) \
THEN CONTINUE \
ELSE List$+=File$+SEP
PRINT "Checking: ",File$," ",
CALL "*ufac",ERR=*NEXT,File$,1; PRINT "Okay"; CONTINUE
PRINT File$,":",MSG(ERR)
NEXT RECORD
NEXT RECORD
!
CLOSE (WorkFile)
Description Use the TABLE directive to define the translation table ProvideX is to use to convert
data from one format to another. The translation table to use is identified via the
TBL= option in I/O operations (READ, WRITE, etc.) or within the TBL( ) function.
Use the first pair of hex digits to define the conversion mask, the remaining hex pairs
to define the converted data bytes.
A translation table is defined by a statement with the TABLE directive followed by a
series of hex digits. Each pair of hex digits represent a single byte. The first byte in
the table (first two hex digits) is the translation and mask. It is ANDed with the hex
value of each byte as it is being converted. The results of this AND operation is then
used as an offset (base zero) into the rest of the transliteration table. The byte at this
offset is the resultant data byte which is either returned in the case of the TBL( )
function and file input, or is written to a file in the case of a file output.
Translation tables are usually used to convert one character set to another such as
ASCII to EBCDIC or for data encryption.
Example:
0110 LET A$="ABCD"
0130 TRANSLATE A$,"ZYXWVUTS",DEC("A")
0140 PRINT A$
->GOTO 110
->RUN
ZYXW
Examples:
TRANSLATE R$,$0A020D0A$
The line-feed character ($0A$) will be replaced by two ($02$) characters:
carriage-return and line-feed ($0D0A$).
Multiple sets of characters may be translated by extending the translation string; e.g.,
TRANSLATE R$,$0A020D0A090120$
In this case, the line-feed character ($0A$) will be replaced by the two ($02$)
carriage-return and a line-feed characters ($0D0A$), and the tab character ($09$)
will be replaced by one ($01$) space character ($20$).
Combined options can be used to create several different tristate box types. The "f",
"T", and "U" options provide the ability to turn tristate boxes into hotspots. This allows
for clickable areas on bitmaps or hyperlinked text in dialogues; e.g.,
"VTf" Creates a general hotspot.
"VUTf" Creates an HTML-like hotspot (e.g., URL hyperlink).
"F^" Creates a word-style toolbar with drop list
Description Use the TRISTATE_BOX directive to create/control a tristate box on the screen or to place
an icon in the Taskbar Notification Icon (see User’s Guide, p.197). A tristate box is a
check box in which the user can toggle between three states: ON to select an option, OFF
to disable it, or your choice of a third state. Refer to the Tristate Box example under
Format 1: Define/Create, p.343, for an illustration. See Chapter 7. Control Object
Properties for a list of properties you can use with tristate boxes.
TRISTATE_BOX contents$
The contents$ string expression defines the text or picture to appear on the tristate
box. In the text, you can use an ampersand "&" preceding a character to identify it as
a hot key the user can press in conjunction with the Alt key to activate the tristate
box from the keyboard.
Using Images
When adding an image to a tristate box, enclose the image name in curly braces. Use
a leading exclamation point (!) to identify the image as internal, or specify the
relative path and filename to access an image file that is external. There are no icons
in the ProvideX executable and ProvideX does not support retrieving icons from
either resource libraries or other system DLLs /executables. For more information on
the options available for displaying internal/external images and the recognized image
file types, see Handling Images and Icons in the User’s Guide, p.398.
When you use text as well as images, the relative positions of the image and the text
set their relative placement. The following are example contents$ expressions:
"{!Add}Add" ! Displays the {!Add} bitmap in front of the text "Add"
"Delete{!Del}" ! Displays the {!Del} bitmap after the text "Delete"
If your string expression includes three bitmaps separated by a vertical bar inside a
single set of curly braces, the first will be displayed when the tristate box is in its
normal state, OFF, the second while the tristate box is ON, and the third when the
tristate box is in a third other state.
You can also use the OPT="B" clause for a Bitmap Button to display different images
for different states.
Format 1: Define/Create
TRISTATE_BOX [*]ctl_id,@(col,ln,wth,ht)=contents$[,ctrlopt]
Use the value in ctl_id to give your tristate box a unique identifier. This value
generates a CTL value whenever the tristate box is toggled. If ctl_id has a leading
asterisk *, the tristate box is considered global (not tied to a specific window).
Examples:
0120 TRISTATE_BOX 102,@(2,19,12,3)="{!File_Save}&Save"
0130 TRISTATE_BOX 103,@(22,15,12,2)="&Destroy{!Trash|!Trash_open|!Bomb_blast}"
0140 TRISTATE_BOX 104,@(22,19,12,3)="{!Lite_Green|!Lite_Yellow|!Lite_Red}"
0150 INPUT (0,HLP="Tristate_Box")@(40,18),"Select...: ",'CL',X$
0160 IF CTL>100 AND CTL<105 THEN TRISTATE_BOX READ CTL,B$; PRINT @(40,19),"Sele
0160:ction:",CTL,":",B$,'CL',; GOTO 0150
0170 IF CTL=0 OR CTL>=3 THEN STOP ELSE GOTO 0150
Format 2: Remove
TRISTATE_BOX REMOVE [*]ctl_id,@(col,ln,wth,ht)=contents$[,ctrlopt]
Use the TRISTATE_BOX REMOVE format to delete a tristate box. By default, if tristate
boxes are not global, they are deleted when a window is removed/dropped or the
application issues a BEGIN. Global tristate boxes can be removed manually or
cleared by a START.
Format 3: Disable/Enable
TRISTATE_BOX {DISABLE | ENABLE} [*]ctl_id[,ERR=stmtref]
Use the TRISTATE_BOX DISABLE format to gray-out a tristate box so that it will be
visible but inaccessible to users. To reactivate it, use TRISTATE_BOX ENABLE.
Format 7: Update
TRISTATE_BOX WRITE [*]ctl_id,state$[,ERR=stmtref]
Use the TRISTATE_BOX format above to write/update new values for the tristate
box.
Description Use the UNLOCK directive to release a previously locked file. If the given file is not already
locked, ProvideX returns Error #14: Invalid I/O request for file state.
Description Use the UNTIL directive to define the end of a REPEAT loop in a program.
Description The UPDATE directive is used to update an existing record to a file (logical file
number / channel). The syntax for this directive is identical to the WRITE Directive,
p.379; however, UPDATE only updates a record if it already exists and will return an
error if the record does not exist.
UPDATE may be used against Keyed, Memory, ODBC, and OCI files. When IND= is
used with *MEMORY*, this directive overwrites an existing index.
Description Use the USER_LEX directive to define alternate keywords in order to simplify
conversions from other languages to ProvideX or to provide support for languages
other than English.
The lexicon table consists of all the ProvideX keywords for directives, functions and
system variables. ProvideX supplies a utility program, *LEXEDIT, to create and
maintain these tables.
Warning: Be very careful when modifying syntax tables. While it is possible to create
syntax tables for other languages and to add additional syntax to the external table, the
wrong changes can make your programs un-listable. (The syntax tables affect both the
listing and editing of programs.) Do not attempt to create or edit the syntax tables
unless you are an experienced programmer and are familiar with these tables.
Please contact your local distributor of ProvideX for assistance.
Where:
@(col,ln, Position and size of the variable drop box region when expanded.
wth,ht) Numeric expressions. Column and line coordinates for top left
corner width in number of columns, and height in number of lines.
(Note that drop box height, when not expanded, is governed by the
system and is roughly 1.5 times the standard graphic font height.)
array_name$ Name of array to load into variable drop box. String variable followed by
{ALL}.
ctl_id Unique logical identifier for a variable drop box (any integer -32000 to
+32000). Avoid integers that conflict with keyboard definitions (e.g., 4
cancels CTL=4 for the F4 key) or Negative CTL Definitions, p.811.
Use this value with the apostrophe operator to access Variable Drop
Box Properties.
ctl_val CTL value to generate when the variable drop box gains focus.
Description Use the VARDROP_BOX directive to create and control variable drop boxes on the
screen. A variable drop box normally displays a single line on the screen with a
DOWN-ARROW on the right side and allows variable input. That is, the user can select
any element from a list of items associated with the variable drop box or can enter
any other value. To view the list the user clicks on the DOWN-ARROW.
Because a variable drop box list is in drop-down form, it takes a smaller amount of
space on the screen than a comparable variable list box. In addition, ProvideX
automatically supplies vertical scrollbars if the number of elements overflows the
drop-down box size. Combine these features to optimize screen design when display
space is at a premium.
Format 1: Define/Create
VARDROP_BOX ctl_id,@(col,ln,wth,ht)[,ctrlopt]
Use the format above to create a variable drop box, giving it a unique ctl_id. When a
user selects an item from a variable drop box, or enters an item that is not on the list,
the associated ctl_id you give to the variable drop box is used to generate a CTL
value. Use the FNT= option to establish the font for variable drop box. If you omit
the font option, ProvideX uses the system default font. Use FNT="*" to set the font as
standard text mode fixed font.
The following example creates a variable drop box that generates a CTL=100 when
any item is selected from it. It's loaded with the items Cat, Dog, and Pig.
0010 VARDROP_BOX 100,@(2,14,12,6)
0020 VARDROP_BOX LOAD 100,"Cat/Dog/Pig/"
The user can select any of the three items supplied or enter any other value.
Format 2: Remove
VARDROP_BOX REMOVE ctl_id[,ERR=stmtref]
Use the VARDROP_BOX REMOVE format to delete a drop box.
Format 3: Disable/Enable
VARDROP_BOX {DISABLE | ENABLE}ctl_id[,ERR=stmtref]
Use the VARDROP_BOX DISABLE format to gray out a variable drop box so that it
will be visible but inaccessible to users. To reactivate it, use VARDROP_BOX ENABLE.
Format 4: Hide/Show
VARDROP_BOX {HIDE | SHOW} ctl_id[,ERR=stmtref]
With the VARDROP_BOX HIDE format, the drop box remains active, but is not
displayed. It is still accessible programmatically. Use the SHOW format to restore the
display and user access.
If you have more items in the list than will fit the physical screen size of the variable
drop box, ProvideX automatically supplies scrollbars. To delete or remove a
specified element from a variable drop box, use an asterisk * in place of the element
string; e.g.,
VARDROP_BOX LOAD 86,4,* ! Deletes item whose index=4 from drop box 86.
Note: This behavior can be altered by use of the '+N' & '-N' Mnemonics, p.619.
Where:
@(col,ln, Position and size of the variable list box region when expanded.
wth,ht) Numeric expressions. Column and line coordinates for top left
corner, width in number of columns and height in number of lines.
(Note that list box height, when not expanded, is governed by the
system and is roughly 1.5 times the standard graphic font height.)
array_name$ Name of array to load into variable list box. String variable followed by {ALL}.
ctl_id Unique logical identifier for a variable list box (any integer -32000 to
+32000). Avoid integers that conflict with keyboard definitions (e.g., 4
cancels CTL=4 for the F4 key) or Negative CTL Definitions, p.811.
Use this value with the apostrophe operator to access Variable List Box
Properties.
ctl_val CTL value to generate when the variable list box gains focus.
ctrlopt Control options. Supported options for VARLIST_BOX include:
ERR=stmtref Error transfer
FNT="font,size[,attr]" Font name, size, optional properties
Refer to the 'FONT' Mnemonic, p.605 for details.
Description Use the VARLIST_BOX directive to create and control variable list boxes on the
screen. That is, the user can select any element from a list of items associated with
the variable list box or can enter any other value.
Format 1: Define/Create
VARLIST_BOX ctl_id,@(col,ln,wth,ht)[,ctrlopt]
Use the format above to create a variable list box, giving it a unique ctl_id. When a
user selects an item from a variable list box, or enters an item that is not on the list,
the associated ctl_id you give to the variable list box is used to generate a CTL value.
Use the FNT= option to establish the font for the variable list box. If you omit the
font option, ProvideX uses the system default font. Use FNT="*" to set the font as
standard text mode fixed font.
The following example creates a variable list box that generates a CTL=100 when
any item is selected from it. It's loaded with the items Cat, Dog, and Pig.
0010 VARLIST_BOX 100,@(2,14,12,6)
0020 VARLIST_BOX LOAD 100,"Cat/Dog/Pig/"
The user can select any of the three items supplied or enter any other value.
Format 2: Remove
VARLIST_BOX REMOVE ctl_id[,ERR=stmtref]
Use the VARLIST_BOX REMOVE format to delete a variable list box.
Format 3: Disable/Enable
VARLIST_BOX {DISABLE | ENABLE}ctl_id[,ERR=stmtref]
Use the VARLIST_BOX DISABLE format to gray out a variable list box so that it will
be visible but inaccessible to users. To reactivate it, use VARLIST_BOX ENABLE.
If you have more items on a list than will fit the physical screen size of a variable list
box, ProvideX automatically supplies scrollbars. To delete or remove a specified
element from a variable list box, use an asterisk * in place of the element string; e.g.,
VARLIST_BOX LOAD 86,4,* ! Deletes item whose index=4 from list box 86.
Note: This behavior can be altered by use of the '+N' & '-N' Mnemonics, p.619.
Description Use the V_SCROLLBAR directive to create a vertical scrollbar control object on the screen.
Your program logic can read and adjust a value by increments to control logical record
position within a file every time the user moves the vertical scrollbar.
Use either V_SCROLLBAR Format 1 or 2 (described below) to define or create a vertical
scrollbar. The value in ctl_id gives the vertical scrollbar a unique identifier. This is
generated as a CTL value whenever the vertical scrollbar is selected and changed.
Format 1: Create
V_SCROLLBAR ctl_id,@(col,ln,wth,ht)[,ctrlopt]
Use this format to create a vertical scrollbar inside the current window; e.g.,
0010 V_SCROLLBAR 100,@(70,2,2,20)
defines a vertical scrollbar 2 columns wide, 20 lines high, starting at column 70 on line 2.
Whenever the scrollbar is selected a CTL=100 is generated.
Format 3: Remove
V_SCROLLBAR REMOVE ctl_id[,ERR=stmtref]
Use the V_SCROLLBAR REMOVE format to delete the vertical scrollbar.
Format 4: Disable/Enable
V_SCROLLBAR {DISABLE | ENABLE} ctl_id [,ERR=stmtref]
Use the V_SCROLLBAR DISABLE format to gray-out a vertical scrollbar so that it will
be visible but inaccessible to users. To reactivate it, use V_SCROLLBAR ENABLE.
Format 5: Hide/Show
V_SCROLLBAR {HIDE | SHOW} ctl_id[,ERR=stmtref]
With the V_SCROLLBAR HIDE format, the scrollbar remains active, but is not
displayed. It is still accessible programmatically. Use the SHOW format to restore the
display and user access.
Note: Once a new position is selected, you must read it before your application can
use the value to update the actual V_SCROLLBAR position.
Example:
0120 V_SCROLLBAR READ 100,X,1000
0130 V_SCROLLBAR WRITE 100,X,1000
Line 0120 reads the scrollbar position relative to 1000 and line 0130 updates the
settings.
Format 8: Update
V_SCROLLBAR WRITE ctl_id,marker,max[,ERR=stmtref]
Use the V_SCROLLBAR WRITE format to update or write the V_SCROLLBAR settings.
Description Use the VIA directive to assign a value to a variable where the variable name is
contained in another string variable. The target variable's type (numeric or string) is
based on the type of expression.
Description ProvideX supplies access to the standard 0 - 15 colours as well as any extended 16 - 254
colours in the colour video palette (internal colour index) in Windows. This directive
can be used to modify the palette in ProvideX; however, the 'OPTION' mnemonic is
the preferred method for assigning colours (by RGB code).
Note: Changing the palette may not work on all systems. This depends on the colour
capabilities of the PC hardware.
Description Use the WAIT directive to have the system suspend execution for the number of
seconds you indicate in the numeric expression. During the time the program is
suspended, the SETESC directive is deferred. This directive will only be processed
once the WAIT interval has elapsed.
Note: The accuracy of the timing varies from operating system to operating system.
On most UNIX/LinuX systems, the WAIT is accurate to within one second.
Description Use the WAIT FOR EVENT directive to relinquish control and wait until an event
occurs from any object.
Format WEND
Description The WEND directive marks the end of a WHILE/WEND loop. When ProvideX
reaches the WEND directive, the expression defined in the currently active WHILE is
re-evaluated. If the result of the evaluation is not zero, control is returned to the
directive following the WHILE. If the value is 0 (zero, false), control transfers to the
directive following the WEND.
Description Use the WHILE directive for conditional looping in a program. ProvideX executes all
directives between a WHILE directive and the next WEND directive repeatedly until
the value of the expression is 0 zero.
When ProvideX encounters a WHILE directive, it evaluates the expression. If the
result is not 0 zero, ProvideX continues execution until a corresponding WEND
directive is encountered, at which point the expression is re-evaluated. ProvideX
continues to loop back to the directive following the WHILE directive until a 0 value
is reached. At this point, ProvideX advances to the next WEND directive, where it
terminates the loop. Then control transfers to the statement following the WEND.
The expression would normally include a logical operator (such as an equals =, less-than
symbol <, or the LIKE Operator, p.816), but you can use any numeric expression.
If ProvideX encounters a WEND directive but is not currently processing a WHILE /
WEND loop, it returns an Error #27: Unexpected or incorrect WEND,
RETURN, or NEXT. All FOR/NEXT, GOSUB/RETURN, and WHILE/WEND sequences
executed within the WHILE/WEND loop must be completed.
Use a conditional EXITTO or BREAK to exit a WHILE/WEND loop early.
Description Use WINPRT_SETUP to control settings for the currently-selected Windows printer
and its properties. This directive can also be used to access and report information
about the printer’s available on the system.
If network account privileges are a consideration, set the 'AW' system parameter to
ensure that WINPRT_SETUP accesses printers that are available to the current user.
Otherwise, information about all printers may be reported.
WINPRT_SETUP Properties
The default properties of a printer are determined by the individual printer/driver
manufacturers. Some properties are not available for all drivers (e.g., collate, ordered
printing). Others vary from printer to printer (e.g., font, point size). Default paper size is
usually letter size (8 1/2" x 11", expressed as PAPERSIZE=1 for DMPAPER_LETTER).
Refer to Paper Sizes below for the complete list of PAPERSIZE=num codes.
The following properties can be assigned to a Windows printer:
COLLATE= YES | NO | AUTO Collate paper (if supported by printer driver).
COLOUR= YES | NO Coloured print (if supported by printer driver).
COPIES= num Set number of copies.
DUPLEX= 1 | 2 | 3 Set for double-sided printing (if supported
by printer driver) where
1 = Duplex is off
2 = Duplex in Portrait
3 = Duplex in Landscape.
The default values are -1:-1:-1:-1, which is the equivalent of no margin setting.
If only two values are given, the right and bottom margins default to the
hardware-imposed print margins. A value of -1 indicates that the printer is to use it’s
default physical margin.
The software internally adjusts the top and left margins by any hardware imposed
printing offsets. Most laser or ink jet printers impose a margin around the edge of the
paper where they cannot print. These values are taken into account by the property
settings in order to assure consistent output positioning regardless of printer type.
Note: Due to printer wear and tear, paper slippage, and other outside factors, the
output position is never guaranteed to be 100% correct. However, the ProvideX logic
for handling margins is consistent with most other Windows-based software. The
alignment will be similar to the output from other programs printed on the same
printer using the same OS and printer drivers.
The keyword MARGIN may be used instead of MARGINS, if preferred; however,
WINPRT_SETUP READ PROPERTIES always returns MARGINS= as the property name.
Paper Sizes
The PAPERSIZE=num option is mapped to paper sizes according to print.h. The
following chart shows the num value followed by the internal name and a general
description of the paper.
Warning: The PostScript driver mistakenly uses DMPAPER_ values between * 50
and 56. Do not use this range when defining new paper sizes.
Paper Source
The SOURCE=num option is mapped to the following internal paper tray definitions:
num Internal Name num Internal Name
1 DMBIN_UPPER 6 DMBIN_ENVMANUAL
1 DMBIN_ONLYONE 7 DMBIN_AUTO
2 DMBIN_LOWER 8 DMBIN_TRACTOR
3 DMBIN_MIDDLE 9 DMBIN_SMALLFMT
4 DMBIN_MANUAL 10 DMBIN_LARGEFMT
5 DMBIN_ENVELOPE 14 DMBIN_CASSETTE
Description The WITH directive is used in Object Oriented Programming (OOP) to simplify the coding
of multiple statements that refer to the same object. A logical "." variable is used in
place of the object name prior to the Apostrophe Operator in all property/ method
references; e.g.,
WITH Button_1.ctl
.'col=1,.'line=49,.'text$="Push Me"
END WITH
When a WITH directive is encountered, the current value of the logical "." variable is
preserved on a stack, which is restored upon execution of an END WITH. Each WITH
should be terminated by an END WITH. The "." variable is only allowed to be
referenced as an object handle; therefore, any other "." references (without the
Apostrophe Operator) are invalid; e.g.,
. = 3 (Invalid)
PRINT . (Invalid)
.'value$="ABC" (Valid)
The value of the "." variable is global; i.e., if it is set in mainline code, it will be
maintained over a CALL or PERFORM to a subprogram or object method. However, if
it changes, the change will not be passed back to the mainline. Subroutines (GOSUB)
can change the value and alter the WITH stack.
The WITH stack is maintained separately from the GOSUB/FOR/WHILE stack. Each
program level (CALL/PERFORM) has its own WITH stack, which is freed upon exit of
the program level. The maximum number of WITH values that can be stacked is 20
per program level. Attempting to issue an END WITH without a corresponding WITH
will generate an Error #27 (Unexpected WEND, RETURN, or NEXT).
Transferring into the middle of a WITH structure is allowed; however, it is the
developer's responsibility to assure that the WITH stack is properly maintained.
The current value of "." is available in TCB(93).
Description Use the WRITE directive to add/update a record to a file (logical file number /
channel). ProvideX also supports use of the WRITE directive with *MEMORY* (a
memory-resident file or queue of records.
Format 1: Write
WRITE (chan[,fileopt])varlist
If the specific record already exists (indexed, direct, or sort files) and you include the
DOM=stmtref option, control transfers to the stmtref. Otherwise, the specified
record is updated.
Examples:
0410 WRITE (1,ERR=1000,DOM=1200)A,B,Z9$
An IND=index clause is mandatory if you are writing to an indexed file; e.g.,
0810 LET I=0
0820 OPEN (8)"PVX_INDX"
0830 READ (8)IOL=110,ERR=0950
0840 LET I=I+1 ! This reserves an empty record at index 0
0850 CALL "SOMETHING",IOL=0110,ERR=950
0900 WRITE (8,IND=I,ERR=9000)IOL=0110
0910 GOTO 0830
The KEY=num is mandatory if you are writing to a Keyed file with an external key or
to a DIRECT or SORT file; e.g.,
0710 OPEN (7)"PVX_SORT"
0720 READ (6)CUST$,NAME$,*,*,*,*,*,*,*,*,*,ERR=0750
0730 WRITE (7,KEY=CUST$)
No KEY= option is allowed if you are writing to a Keyed file whose primary key is
composed of data fields embedded in the record data. In Keyed files with multiple
keys, the WRITE directive will automatically update all alternate keys. For instance,
alternate keys 0 [1:1:6] and 1 [2:1:10] are updated as follows:
KEYED "PVX_KEYD",[1:1:6],[2:1:10],,256
0210 OPEN (2)"PVX_KEYD"
0220 READ (6)CUST$,NAME$,*,*,*,*,*,START_DT$,CRED_LIM,TERMS,END_DT$,ERR=0250
0230 WRITE (2)IOL=0100
ProvideX uses the variables in the variable list either in delimited form or in
accordance with any format specified (with headers, etc.). The contents of these
fields are used to generate the actual data record. Numeric data converted during a
WRITE directive does not use the 'DP' Decimal Point Symbol or 'TH' Thousands
Separator system parameters for European decimal settings.
The list of variables can refer to an IOList (using IOL=iolref) as above. The iolref can be
the line number or label of the line containing the IOList, or it can be a string
containing a compiled IOList. If you omit the list of variables from the WRITE
directive, ProvideX uses the IOL specified (if any) on your OPEN statement for the file.
Writing to *MEMORY*
A WRITE operation will check the last entry in the key table for the key being added
before proceeding to the top of the key chain to determine the new entry point. This
dramatically increases the speed of writing additional records in sequential order.
You can use WRITE and/or WRITE RECORD directives to update records in a
Memory file using an IOList or a string expression. Records may be inserted by
index at a given index number. If the index does not already exist, the record will be
automatically appended at the last unused index.
ProvideX will not overwrite existing records. Use the DOM= option when you write
to a memory file. The following two examples below insert a new record at index 3
without overwriting the current record at index 3. The record that was at index 3 is
now at index 4 and the number of records in the file has increased by one.
WRITE (14,IND=3)IOL=2010 or
WRITE RECORD (14,IND=3)"DOGCATPIG"
To update a given record in a Memory file, use KEY= with a given key value:
0910 WRITE (14,KEY=KK$,DOM=0920)IOL=2010 or
WRITE RECORD (14,KEY=KK$)A$
Note: If a serial file is not locked before you write to it, an Error #13: File access
mode invalid will occur on the WRITE directive. Use OPEN LOCK for your serial file
to prevent this error from occurring on the WRITE.
Example:
SERIAL "PVX_SER",,256
0510 OPEN LOCK (5)"PVX_SER"
0520 READ (6)CUST$,NAME$,ADDR1$,ADDR2$,CITY$,PROV$,POSTAL$,START_DT$,CREDLIM,
0520:TERMS,END_DT$,ERR=0550
0530 WRITE (5)IOL=0090
0540 GOTO 0520
0550 STOP
Description Use the WRITE RECORD directive to add / update a record for a file (logical file
number / channel). If the specific record already exists (indexed, direct, or sort files)
and you include the DOM=stmtref option, control transfers to the stmtref.
Otherwise, the specified record is updated.
In Keyed files with multiple keys, the WRITE RECORD directive automatically
updates all alternate keys. ProvideX supports use of the WRITE RECORD directive
with *MEMORY*.
Writing to *MEMORY*
A WRITE operation will check the last entry in the key table for the key being added
before proceeding to the top of the key chain to determine the new entry point. This
dramatically increases the speed of writing additional records in sequential order.
You can use WRITE and/or WRITE RECORD directives to update records in a
Memory file using an IOList or a string expression. You can add records by index,
inserting records at the given index number.
ProvideX will not overwrite existing records. Use the DOM= option when you write
to a Memory file. The following two examples below insert a new record at index 3
without overwriting the current record at index 3. The record that was at index 3 is
now at index 4 and the number of records in the file has increased by one.
WRITE (14,IND=3)IOL=2010 or
WRITE RECORD (14,IND=3)"DOGCATPIG"
To update a given record in a Memory file, use KEY= with a given key value:
0910 WRITE (14,KEY=KK$,DOM=0920)IOL=2010 or
WRITE RECORD (14,KEY=KK$)A$
System Functions
@( ) EVS( ) LOG( ) RND( )
@X( ) / @Y( ) EXP( ) LRC( ) RNO( )
ABS( ) FFN( ) LST( ) SEP( )
ACS( ) FIB( ) MAX( ) SGN( )
AND( ) FID( ) MEM( ) SIN( )
ARG( ) FIN( ) MID( ) SQR( )
ASC( ) FPT( ) MIN( ) SRT( )
ASN( ) GAP( ) MNM( ) SSZ( )
ATH( ) GBL( ) MOD( ) STK( )
ATN( ) GEP( ) MSG( ) STP( )
BIN( ) HSA( ) MSK( ) STR( )
BSZ( ) HSH( ) MXC( ) / MXL( ) SUB( )
CHG( ) HTA( ) NEW( ) SWP( )
CHR( ) HWN( ) NOT( ) SYS( )
CMP( ) I3E( ) NUL( ) TAN( )
COS( ) IND( ) NUM( ) TBL( )
CPL( ) INT( ) OBJ( ) TCB( )
CRC( ) IOL( ) OPT( ) TMR( )
CSE( ) IOR( ) PAD( ) TRX( )
CTL( ) JUL( ) PCK( ) TSK( )
CVS( ) JST( ) PFX( ) TXH( )
DEC( ) KEC( ) PGM( ) TXW( )
DIM( ) KEF( ) POS( ) UCP( )
DIR( ) KEL( ) PRC( ) UCS( )
DLL( ) KEN( ) PRM( ) UPK( )
DSK( ) KEP( ) PTH( ) VIN( ) / VIS( )
DTE( ) KEY( ) PUB( ) XEQ( )
ENV( ) KGN( ) RCD( ) XFA( )
EPT( ) LCS( ) RDX( ) XOR( )
ERR( ) LEN( ) REC( )
EVN( ) LNO( ) REF( )
Overview
Overview BMK
This chapter provides an alphabetically arranged list of all the system functions in
ProvideX. Each definition includes the correct syntax (showing associated
parameters), values returned, a general description, examples, and sometimes a
cross reference to related documentation. The list begins on the following page.
Formats @(column[,line][,ERR=stmtref])
Where:
column Column number. Integer value indicating a column position on a printer
or terminal screen (0 to the number of columns available on the screen -1)
line Optional line number. Integer value indicating a line position on a printer
or terminal screen (0 to the number of lines available on the screen -1)
stmtref Program line number or label to transfer control to.
Examples The following statement prints the date in the upper left hand corner of the screen
with the time starting in column 75 of the top line:
PRINT @(0,0),"Date: ",DAY,@(75),TIM
This prompts for information on the left side, 5 lines from the top:
INPUT @(0,5),"Enter favorite sport:",@(30),SPORT$,@(0,6),"Thanks"
This prints the date right-justified in the upper right hand corner of the screen:
LET D$=DTE(0:"%Dl %Ms %D")
PRINT 'BLUE',@(80-LEN(D$),0),D$,
Returns Integers (x-axis coordinate for column and y-axis coordinate for line, in graphical
units – similar to pixels).
Description Use these functions to convert column and line number addresses for graphics
output into x- and y-axis coordinates in graphical units (similar to pixels). The values
returned are integers. In the example below, the functions return 16 graphical units
as the coordinate for column 1 and 60 for line 2:
When the example above is RUN, the words "CUSTOMER LISTING" are displayed on
the screen, outlined by a rectangle. The @X(col) values start the rectangle at the
graphical equivalent of column 4 (one column before the text) and end it one column
after the text. The @Y(line) values are equivalent to lines 5 and 6, and they define the
rectangle as 1 line high starting at the top of line 5.
Format ABS(num[,ERR=stmtref])
Where:
num Numeric expression whose absolute value is to be returned.
stmtref Program line number or label to transfer control to.
Description The ABS( ) function returns the absolute value of the numeric expression num. The
value returned is a positive numeric value or zero. For instance, the absolute value of
the numeric expression (X) is returned as follows:
Format ACS(num[,ERR=stmtref])
Where:
num Numeric expression (range: -1 to +1) whose Arc-Cosine is to be returned.
stmtref Program line number or label to transfer control to.
Description The ACS( ) function returns the Arc-Cosine of the numeric expression num. It
returns a value between 0 zero and π (pi) rounded to the current PRECISION in effect.
This is the inverse of the COS( ) function.
The value of your numeric must be in the range of -1 to +1 inclusive. Otherwise
ProvideX returns
Error #40: Divide check or numeric overflow.
Format AND(value1[$],value2[$][,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
value1[$] Compared values. String or numeric expressions/variables. If strings,
value2[$] value1$ must be the same length as value2$
Description The AND( ) function performs a bit-wise 'AND' comparison of two string or
numeric expressions/variables, and generates a value as a result. The length of the
two string expressions must be equal or ProvideX returns an Error #46: Length
of string invalid.
Binary Result
0 and 0 0
1 and 0 0
0 and 1 0
1 and 1 1
BITS$=$03$
IF AND(BITS$,$02$)=$02$ THEN PRINT "bit 2 is on"
Format ARG(position[,ERR=stmtref])
Where:
position Position of the argument you want returned. Numeric expression.
stmtref Program line number or label to transfer control to.
Description The ARG( ) function returns the string value of one of the arguments specified in the
operating system command that launched ProvideX. The numeric expression
position indicates which argument is to be returned:
-4 Original command line used to start ProvideX.
-3 ProvideX Activation Key directory name.
-2 ProvideX Library Directory name.
-1 INI file in use (fully resolved path to the INI file). Returns "" on
UNIX/Linux.
0 The command that launched ProvideX
1, 2, 3, etc. Other arguments after the command
If you refer to an invalid argument, ProvideX returns:
Error #41: Invalid integer encountered (range error or non-integer)
Example Given
Format ASC(char$[,ERR=stmtref])
Where:
char$ Single-character whose ASCII value is to be returned. String expression.
stmtref Program line number or label to transfer control to.
Description The ASC( ) function returns the internal numeric value of a given character char$,
based on its position in the ASCII character set/table. The value returned is an
integer, range 0 to 255 (ASCII character set number). Only the first character in the
string is converted to its internal value.
Format ASN(num[,ERR=stmtref])
Where:
num Numeric expression (range: -1 to +1) whose ARC-Sine is to be returned.
stmtref Program line number or label to transfer control to.
Description The ASN( ) function returns the Arc-Sine of the given numeric expression num. The
function returns a value between -π (negative pi) divided by 2 and +π (+pi) divided
by 2, rounded to the current PRECISION in effect. This is the inverse of the SIN( )
function.
Format ATH(hex_string$[,ERR=stmtref])
Where:
hex_string$ Hex string expression to be converted to ASCII. The string must be
an even number of bytes in length and consist of only the characters
0 through 9 and A through F.
stmtref Program line number or label to transfer control to.
Description The ATH( ) function converts string containing valid hexadecimal data to ASCII. The
ASCII string returned by the ATH( ) function is the converted value of each set of
two hex characters to one ASCII character.
Examples -:h$="414243"
-:?ath(h$)
ABC
Format ATN(num[,ERR=stmtref])
Where:
num Numeric expression whose Arc-Tangent is to be returned.
stmtref Program line number or label to transfer control to.
Description The ATN( ) function returns the Arc-Tangent of the numeric expression num. It will
return a value between -π (negative pi) divided by 2 and π divided by 2, rounded to
the current PRECISION in effect. This is the inverse of the TAN( ) function.
Format BIN(num,len[,ERR=stmtref])
Where:
len Length of the string to be returned. Use a numeric expression. Integer
value.
num Numeric value to convert to a string. Use a numeric expression. Integer
value.
stmtref Program line number or label to transfer control to.
Description The BIN( ) function converts the numeric expression num to an ASCII string (as its
binary value). The string returned will be the length specified, len. The value is right
justified in the resultant string.
The value is converted to two's complement format before the string is generated. If
the number was negative the leading bits will all be set to ON (binary 1).
2 is binary 00000010
1 is binary 00000001
0 is binary 00000000
-1 is binary 11111111
-2 is binary 11111110
Format BSZ(num[,ERR=stmtref)
Where:
num Bank number (ignored). Numeric expression.
stmtref Program line number or label to transfer control to.
Description The BSZ( ) function is primarily included in ProvideX for compatibility with other
Business Basic languages. The value it returns is 0 zero in most ProvideX
implementations.
Format CHR(num[,ERR=stmtref])
Where:
num Value of the character to return. Numeric expression. Range: integer
from 0 to 255 (the character's number in the ASCII table).
stmtref Program line number or label to transfer control to.
Description The CHR( ) function returns a single-character ASCII string of the numeric
expression defined by num. The value of num must be an integer in a range from 0
to 255 (the position of the character in the ASCII table). The first printable character
in the ASCII character set is the blank, $20$, which is CHR(32).
Format CMP(string[,ERR=stmtref])
Where:
string Original data to be compressed.
stmtref Program line number or label to transfer control to.
Description The CMP( ) function uses standard ZLib compression libraries to compress a data
string. To expand (uncompress) the data, use the UCP( ) Function, p.543. TCB(195)
will return 1 if ZLib support is available.
The data returned from the CMP( ) function includes a single header byte (value
between $01$ and $FF$) to facilitate ZLib uncompression routines. This represents a
multiplier value that can be used against the length of the compressed data to
estimate uncompressed data size (basically, original size/compressed size rounded
up and capped at 255). When expanding the compressed data using the UCP( )
function, the length of the compressed data will be multiplied by this header byte to
determine an estimated uncompressed buffer size.
Note: Since the CMP( ) and UCP( ) compression routines are not supported on all
platforms, systems using these functions may not be fully portable.
Typically, the compressed data will be smaller than the original data; however, in
rare instances or when dealing with short strings, the compressed data might be
longer. Also be aware that data returned from the compression logic may contain
any potential character; therefore, if writing to a data file, do not use field delimiters
since they may occur within the compressed data.
Format COS(num[,ERR=stmtref])
Where:
num Numeric expression whose Cosine is to be returned.
stmtref Program line number or label to transfer control to.
Description The COS( ) function returns the Cosine of the numeric expression. It returns a value
between -1 and +1, rounded to the current PRECISION in effect. ACS( ) is its inverse
function.
Format CPL(statement$[,ERR=stmtref])
Where:
statement$ String containing the statement to compile.
stmtref Program line number or label to transfer control to.
Description The CPL( ) function returns the ProvideX internal (compiled) format of the statement
provided in the string argument statement$.
Format CRC(chars$[,basis$][,ERR=stmtref])
Where:
basis$ Optional initial value to be used as the basis of the CRC. It must be two
characters long if included in the statement. Default: $0000$.
chars$ String of characters on which to calculate a cyclic redundancy check.
stmtref Program line number or label to transfer control to.
Note: The CRC( ) function is used primarily for generating transmission checksums
on synchronous communications.
Description The CRC( ) function returns the cyclic redundancy checksum of a string of
characters.
Use the initial value (basis$) to generate an overall CRC( ) of multiple strings. See the
example below, where CRC(B$) with an initial value of CRC(A$) will be the same
as CRC(A$+B$). If you omit the initial value, ProvideX uses the default value,
$0000$.
Examples A$="Hello",B$="World"
0010 LET C$=CRC(A$)
0020 LET C$=CRC(B$,C$)
Yields the same result as:
0030 LET C$=CRC(A$+B$)
That is:
HTA(C$) Value
After line 0010 $F353$
After line 0020 $6053$
After line 0030 $6053$
Where:
compare1[$] Comma-separated list of numeric or string expressions for
compare2[$] ... comparison with expression[$].
expression[$] Numeric or string expression to be used for comparison.
stmtref Program line number or label to transfer control to.
Description The CSE( ) function is used to compare an expression with a series of values. If the
expression has a match, the resulting number will point to the location of the
matched value in the series; i.e., if expression matches the 5th value in the compare
series, then CSE( ) returns 5. If no match is found, CSE( ) returns 0.
Returns CTL value associated with input, or input sequence associated with CTL.
Description The CTL( ) function is designed for use in programs that interact directly with the
terminal. It provides access to the CTL lookup tables maintained internally in
ProvideX. When an input sequence is passed to CTL( ), it returns the CTL values
associated with the input; e.g., PRINT CTL(0,$000002e$) returns -1007. When a
CTL value is passed to CTL(READ ..), it returns the input sequence associated with
the control.
Examples The following example reads an uppercase string into Y$ without editing and stops on a
CTL value > 0:
0020 OPEN (1) FID(0); Y$=""
0030 READ RECORD (1,SIZ=1)X$
0040 IF X$<" " OR X$=$7F$ THEN GOTO 0100
0050 LET X$=UCS(X$),Y$=Y$+X$
0060 PRINT X$,; GOTO 0030
0100 LET C=CTL(0,X$,ERR=0050); GOTO 0130
0110 READ RECORD (1,SIZ=1)X1$
0120 LET X$=X$+X1$; GOTO 0100
0130 IF C>0 THEN GOTO 1000 ! Found it
0140 LET C=CTL(0,C,ERR=0160) ! Check alternates
0150 GOTO 0130
0160 PRINT 'RB',; GOTO 0030
1000 PRINT "DONE"; STOP
In the example below, the CTL( ) function returns a string value containing a list of
control sequences for a specified CTL value. The string is made up of a series of
fields where the 1st byte preceding each field indicates the number of characters in
the control sequence; the rest of the field shows the actual control sequence. To print
control sequences for function keys F1 through F4 :
0010 FOR CTL_CODE=1 TO 4
0020 PRINT 'LF',STR(CTL_CODE:"#0")," ",
0030 LET X$=CTL(READ 0,CTL_CODE)
0040 IF X$="" THEN GOTO 0070
0050 LET X=DEC(X$(1,1)); PRINT PAD(HTA(X$(2,X)),10),
0060 LET X$=X$(X+2); GOTO 0040
0070 NEXT
0080 PRINT " DONE"; STOP
-:RUN
1 000070
2 000071
3 000072
4 1B 000073 00FF82 DONE
If the expression is numeric, ProvideX returns any alternate CTL value that has been
assigned; e.g., PRINT CTL(0,$000070$) returns 1 (CTL=1 or the F1 key).
Description The CVS( ) function converts a string of data to different forms based on the numeric
values used for cvs_code (e.g., to convert to upper case, stripped string, etc). The
numeric expression tells ProvideX the type of conversion to perform. If you append
a colon ":" and string value, the control character used in the conversion will be the
first character of the string. Otherwise, it will be a space.
You can also use the function to return the current accent translation table and do translations
based on it. For more information, refer to the DEF systab= Directives, p.73.
The value of cvs_code is made up of a series of binary values indicating:
PRINT CVS("$$$123",32:"$")
yields $123
Format DEC(string$[,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
string$ Character string or variable containing value to be converted to binary.
Description The DEC( ) function converts a string to its corresponding binary equivalent. (The
value returned is a two's complement binary integer which corresponds to the value
of the string.)
Description Use the DIM( ) function to generate or initialize a string. You can also use it to obtain
information about the size of an array you have already defined using the DIM
directive.
DIM(READ NUM(array_name[$][,subscript]))
Use the DIM(READ NUM( )) function to read the total number of elements in a
dimensioned array; e.g.,
0100 DIM X[0:15]
0110 PRINT DIM(READ NUM(X))
->run
16
DIM(READ MAX(array_name[$][,subscript]))
Use the DIM(READ MAX( )) function to read the maximum element number in a
dimensioned array; e.g.,
0110 DIM X[0:15]
0120 PRINT DIM(READ MAX(X))
->run
15
DIM(READ MIN(array_name[$][,subscript]))
Use the DIM(READ MIN( )) function to read the minimum element number in a
dimensioned array; e.g.,
0110 DIM X[0:15]
0120 PRINT DIM(READ MIN(X))
->run
0
Format DIR(disk_id[$][,ERR=stmtref])
Where:
disk_id[$] Disk to check. String or numeric expression.
stmtref Program line number or label to transfer control to.
Note: This function is primarily for use in PVX for Windows. Under UNIX, ProvideX
assumes that there is only one disk drive and will only returns the current directory.
Description The DIR( ) function returns a string naming the current directory for the disk drive
specified. Use either a string or numeric value to specify the drive.
If a string is given, the first character indicates the drive (A, B, C and so on). A null ("")
string returns the name of the current directory for the current drive. If a numeric value is
given, it must be an integer in a positive range starting at zero. A value of zero (0)
indicates the first drive, 1 the second ...
When reporting items based on the universal naming convention, this function returns
the UNC-style pathname; i.e., for a current directory of \\server\share\path\ DIR( )
returns \path\.
Examples The following illustrates use of the DIR( ) function in a Windows environment.
0100 PRINT "Available Drives by Drive Number"
0110 FOR X=0 TO 25 ! Check for Drives 0 to 25
0120 LET A$=DIR(X,ERR=*NEXT); PRINT STR(X)," ",A$
0130 NEXT X
0200 PRINT "Available Drives by Drive Letter"
0210 FOR X=65 TO 90 ! Check for Drives A to Z
0220 LET A$=DIR(CHR(X),ERR=*NEXT); PRINT CHR(X)," ",A$
0230 NEXT X
->run
Available Drives by Drive Number
0 \
2 \Program Files\Sage Software\ProvideX\
3 \WINDOWS\
6 \applicationlogos\
7 \
Available Drives by Drive Letter
A \
C \Program Files\Sage Software\ProvideX\
D \WINDOWS\
G \applicationlogos\
H \
Returns Windows DLL (Dynamic Link Library), UNIX/Linux shared object module, or
address to a function within an external library.
Description Use the ProvideX DLL( ) function to access functions within DLLs that are external to
ProvideX. This function is available under MS Windows as well as most
UNIX/Linux environments (in which case, TCB(196) returns 1 if the function is
supported). It's similar to a call to execute external functions from inside ProvideX
applications. The ProvideX DLL( ) function will also return any function identifiers
and addresses, as defined by the DLL routine.
DLLs do not need to be registered in Windows to be used in ProvideX. Under
WindX, it is important to note that DLLs run on the host. Use a call to a WindX
program to invoke a DLL.
Use the function DLX( ) to return 32-bit values from within a 16-bit Windows
environment. For further information on calling DLLs and other external
components from ProvideX, refer to the User’s Guide, Chapter 9.
DLL( ) Parameters
DLLs normally expect one of two types of parameters: integers and pointers. The
arguments/parameters you use when you call the DLL( ) function are passed to the
function in the following ways:
Example Type 32-Bit Data Format Passed 16-Bit Data Format Passed
X$ Strings Address of string Address of string
X Numeric Variables Double word value (32-bit) Double word value (32bit)
X% Integer Variables 16-bit value passed as 32-bit Single word value (16bit)
INT(X+1) INT( ) Function Standard 32 bit Single word value (16 bit)
X+Y Numeric Expression 32-bit value 32-bit value
Format DSK(disk_id[$][,*][,ERR=stmtref])
Where:
* Asterisk. Returns the name of the volume (rather than the drive).
disk_id[$] Disk to check. String or numeric expression.
stmtref Program line number or label to transfer control to.
Note: This function is primarily for use in PVX for Windows. Under UNIX, ProvideX
assumes that there is only one disk drive and returns a null ("") string.
Description The DSK( ) function checks for the existence of a disk drive and returns the current
disk drive identifier, volume name. Use either a string or numeric value to specify
the drive. If a string is given, the first character indicates the drive (A, B, C, etc). A
null ("") string returns the current disk identifier.
This function returns the operating system's drive prefix ("A:","B:", etc.). If you
place an asterisk * after disk_id, the function returns the name of the volume mounted
on your drive, if any; e.g., DSK("C",*) or DSK(2,*). If the disk drive or volume
doesn't exist, ProvideX returns an Error #17: Invalid file type or
contents.
If a numeric value is given, then the value must be a positive integer in a range starting
at zero. Use 0 zero as the value for the first drive, 1 for the second, and so on.
When reporting items based on the universal naming convention, this function returns
the UNC-style pathname; i.e., for a current directory of \\server\share\path\ DSK( )
returns \\server\share\.
Examples ->?dsk("")
C:
->?dsk(0)
A:
Description The DTE( ) function converts a date (and time) from Julian form to a formatted
string. fmt$ defines the format to be returned, in which each component of the date
is represented by percent sign (%) followed by a one- or two-letter code. The first
letter indicates a source for the data (day, month, year etc.). The second character (if
specified) indicates how to format the returned value. The chart below shows the
results of the various format options:
In general, when the second character is l (lowercase L), the result is long text format – an
s indicates short text format. ProvideX maintains the exact contents of the text internally.
The contents can be changed using a DEF DTE( ) directive. If the second letter is z,
ProvideX supplies the value converted to a two digit value. ProvideX returns a 1-byte
binary value if the second letter is p (for compatibility with other languages). The format
can also contain YYYY, YY, MM, and DD (e.g., "YYYY/MM/DD") for current Long Year, Year,
Month and Day values:
Char1 Source Format Default
DD Day of month 1-31
MM Month in year 1-12
YY Year 00-99
YYYY Year 1970-9999
If you include any other characters in the date format (e.g., punctuation: slashes,
spaces, etc.) ProvideX copies them, as literals, to the output. To include a percent
sign as a literal in the output, use %% in the format.
ProvideX includes the DTE("%A") format to deal with legacy application Y2K
conversions (Version 4.10). The current year is returned using 00-99 for 1900
through 1999, A0-A9 for 2000 through 2009, B0-B9 for 2010 through 2019, etc.
ProvideX supports fractional values in the DTE( ) function, using the
DTE(fraction,*:"form") format.
Description Use the ENV( ) function to obtain the value of an environment variable (specified
numerically or in a string) from the externally defined environment table.
Environment variables are typically external to ProvideX and are used by the
operating system and other utilities for defining the user's environment.
Format EPT(num[,ERR=stmtref])
Where:
num Numeric expression whose exponent is to be returned.
stmtref Program line number or label to transfer control to.
Description The EPT( ) function returns the power of 10 for the numeric expression provided.
Description The ERR( ) function can be used to determine the value of the internal ERR variable
or receive additional information about the last un-trapped error.
Format EVN(var$[,val][,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
val Default value to be returned if the evaluation fails at run-time (with any
error except a syntactical error). If supplied, the error will be ignored and
the value will be returned instead. For instance, PRINT EVN("40/0",0)
would return val=0 rather than generating Error #40: Divide
check or numeric overflow.
var$ String expression containing numeric variable name. Maximum string
size 8kb. Receives the returned evaluated contents of the variable. You can
build the variable name using string expressions, as in the example below.
Description The EVN( ) function evaluates and returns the numeric value of a numeric variable
or computed expression. Use this function to process a stored or computed
expression and obtain its value.
Examples In this example, EVN("GL_"+X$) builds the variable name based on user input and
returns the value stored in the variable.
00010 GL_YTD=10000,GL_MTD=3000,GL_CUR=10
00020 input "Which field (YTD,MTD,CUR):",X$
00030 print evn("GL_"+X$):"$###,##0.00-"
00040 stop
For the example above, if the user's input is CUR for X$, the variable name will be
GL_CUR. If the value stored in GL_CUR in the current record is, for example,
9999.63, ProvideX prints that value (using the format mask) as $9,999.63.
In this example, EVN(V$) will print the numeric value stored in V$ for the current
record of logical file number RPT_FN.
0090 K$=KEY(RPT_FN); IF K$(1,12)<>RPT_ID RETURN
0100 READ (RPT_FN)L,C,V$
0110 PRINT (RPT_FN) @(C,L),EVN(V$)
0120 GOTO 0090
Format EVS(var$[,val$][,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
val$ Value to be returned if the evaluation fails at run-time (with any error
except a syntactical error). Optional. If you include a value, the error will
be ignored and the value will be returned instead; e.g.,
A=9999; PRINT EVS("str(a:""##0"")","<OverFlow>")
returns the value <Overflow> rather than generate
Error #43: Format mask invalid.
var$ String variable name. Receives the returned evaluated contents of the
variable. You can build the variable name using string expressions, as in
the example below.
Description The EVS( ) function evaluates and returns the value (evaluated contents) of a string
variable.
Examples In this example, EVS( ) builds the string variable's field name ("CST_"+X$+"$")
based on the user's input and returns the value stored in it.
00010 CST_NAME$=who,CST_ADDR$="8920 Woodbine Ave"
00020 CST_CITY$="Markham",CST_CONTACT$="Support"
00030 input "Which field (NAME,ADDR,CITY,CONTACT):",X$
00040 print evs("CST_"+X$+"$")
00050 stop
For instance, if the user's input for X$ in the example above is NAME, the variable
name will be CST_ADDR$. The value in EVS(CST_ADDR$) for the current record
could be 8920 Woodbine Ave, which is what ProvideX would return and then print.
Format EXP(num[,ERR=stmtref])
Where:
num Power of 10 (ten) to be returned. Numeric expression.
stmtref Program line number or label to transfer control to.
Description The EXP( ) function returns the value of 10 raised to the power of a given numeric
value (i.e., 10^num). Fractions are allowed. The numeric value returned is rounded
to the current PRECISION in effect. This is the inverse of the LOG( ) function.
Returns Integer, channel/file number for open file (-1 if not open).
Description This function checks all open files for any reference to the filename$ specified. The
function returns the file number as an integer if the file is open. If the file is not
currently open on any channel, FFN( ) returns a value of -1. The filename specified
in FFN( ) must match the name used to OPEN the file; e.g.,
open(1)"cstfile
print "channel is: ",ffn("C:/Program Files/Sage
Software/ProvideX/NOMADS/cstfile") ! Incorrect
channel is: -1
print "channel is: ",ffn("cstfile") ! Correct
channel is: 1
Examples Read a record from the CUSTDB file. If the file is not open, then open it on a Global
file number.
0100 LET X=FFN("CUSTDB")
0110 IF X=-1 THEN LET X=GFN; OPEN (X)"CUSTDB"
0120 READ (X,KEY=CST_ID$,ERR=9000)IOL=%CST_IOL$
FFN( ) is case-sensitive (as is necessary in UNIX). To perform a case-insensitive
search for the filename, set either 'FL' (lower case) or 'FU' (upper case) parameters.
0100 OPEN (5)"CSTfile" ! With neither 'FL' nor 'FU' set
-:PRINT "channel is: ",FFN("CSTFILE")
channel is: -1
-:SET_PARAM 'FL'
-:PRINT "channel is: ",FFN("CSTFILE")
channel is: 5
-:PRINT "channel is: ",FFN("cstFILE")
channel is: 5
Format FIB(chan[,ERR=stmtref])
Where:
chan Channel/logical file number of the file about which you want information.
stmtref Program line number or label to transfer control to.
Description The FIB( ) function returns a character string containing a file information block
description for an existing open file. This information may be passed to a FILE
directive to subsequently recreate the file. Refer to the File Information Functions
Overview and the ProvideX Standard Format for FIB(0) and FID(0) for further
details. Unlike FID( ) , the FIB( ) function is not affected by emulation mode settings.
Note: When 'FF' is set to 0 or 3 and the 'PO' system parameter is switched on, the FID( )
and FIB( ) functions return the original path used when the file was opened. 'FF'.
You can define the value returned by FID(0) externally using the Environment
variable PVXFID0 or internally using the SETFID directive. FIN( ) returns file
information about the data structure (describing the physical aspects of a file such as
maximum record, number of records, key size, record size).
Format FID(chan[,ERR=stmtref])
Where:
chan Channel or logical file number of the file to return information about.
stmtref Program line number or label to transfer control to.
Description The FID( ) function returns a character string containing the file information
descriptor for an existing open file. If the file is a device (printer, terminal, etc.), the
filename used to open the file will be returned. If the file is a disk file, a file
description string is returned. You can make subsequent use of this file description
by passing it to a FILE directive to recreate the file. For further information, refer to
the File Information Functions Overview, p.430 and the ProvideX Standard
Format for FIB(0) and FID(0), p.431.
If you are running ProvideX in an emulation mode, the format of the information
returned will be changed to reflect the system being emulated.
Note: When 'FF' is set to 0 or 3 and the ’PO’ system parameter is switched on, the FID( )
and FIB( ) functions return the original path used when the file was opened.
Also: The FID( ) and FIN( ) format layouts will be changed whenever there is a change to
the 'FF' system parameter.
Finally, you could see if the terminal emulator allows you to define values for function
keys and has an escape sequence to send the values. Some terminals send a "HEREIS"
string on receipt of an ENQ (hex $05$), but this varies from terminal to terminal.
FIB(1) / FID(1)'FF'=1
Bytes Description (Total length=22 bytes)
1,3 $000000$
4,6 Characters 1-6 of filename
10,1 File type indicator:
$00$ - Indexed
$01$ - Serial - WindX connected file (any type)
$02$ - Keyed or EFF
$03$ - Open via ISZ= (binary)
$04$ - Program
$0D$ - Directory
$0F$ - Device
11,1 External key size
12,3 Maximum number of records
15,2 Record size
17,4 Reserved for future use
21,2 Characters 7-8 of filename
FIB(2) / FID(2)'FF'=2
Bytes Description (Total length=16 bytes)
1,6 Characters 1-6 of filename
7,1 File type indicator:
$00$ - Indexed
$01$ - Serial - WindX connected file (any type)
$02$ - Keyed
$03$ - Open via ISZ= (binary)
$04$ - Program
$0D$ - Directory
$0F$ - Device
8,1 External key size
9,2 Maximum number of records (bytes reversed)
11,2 Record size (bytes reversed)
13,4 Not used
FIB(3) / FID(3)'FF'=3
Bytes Description (Total length=9+ bytes)
1,1 File type indicator:
$00$ = Indexed
$01$ = Sequential - WindX connected file (any type)
$02$ = Keyed
$03$ = Opened via ISZ= (Binary)
$04$ = Program
$05$ = Directory
$06$ = BBx Mkeyed (no External Key)
$07$ = C-Isam
$0A$ = UNIX Pipe
$0E$ = TCP/IP-Network
$0F$ = Device/Attached Printer
2,1 External key size
3,4 Maximum number of records
7,2 Record size (bytes reversed)
9,... Pathname; e.g.,
0100 SET_PARAM 'FF'=3
0110 OPEN (30)"SESAME"
0120 LET A$=FID(30)
0130 PRINT A$(9)
->run
C:\OTHER\TESTS\SESAME
1,... Device name; e.g.,
0200 SET_PARAM 'FF'=3
0210 OPEN (31)PRINTER$
0220 B$=FID(31); PRINT B$
->run
LPT1
[Details for files, above (1,1 to 9,...) inapplicable]
FIB(4) / FID(4)'FF'=4
FID(4) is the same as FID(3) but all serial files return a file type indicator of $03$ for
binary. This format is only intended to facilitate program migration to ProvideX.
Description The FIN( ) function returns a character string containing details about an existing
open file. The information returned is not the same as that in the FIB( ) function.
While some of the information in the FIN( ) function is common to information in the
FIB( ) function, the FIN( ) function includes more detailed information about the
physical file (e.g., file size in bytes, date and time of last update, etc.).
Note: The FID( ) and FIN( ) format layouts will be changed whenever there is a change to
the 'FF' system parameter.
Note: File times returned by the FIN( ) function on UNIX/Linux systems are reported
based on the current time zone, rather than GMT. This keeps the file time reporting
consistent with Windows versions of ProvideX.
Format FPT(num[,ERR=stmtref])
Where:
num Numeric expression whose fractional portion will be returned.
stmtref Program line number or label to transfer control to.
Description The FPT( ) function returns the fractional portion of the given numeric value. The
value returned is always rounded to the PRECISION currently in effect.
Format GAP(string$[,ERR=stmtref])
Where:
string$ Character string to convert to Odd parity.
stmtref Program line number or label to transfer control to.
Description The GAP( ) function converts and returns the character string expression in Odd
parity. This function is typically used when dealing with communication lines. It is
not normally used in operating systems since the standard communications drivers
handle the generation of parity.
The number of one-bits in each byte of the character string determines the parity of
data. Odd parity data always has an odd number of one-bits in each byte of data.
Description The GBL( ) function returns and maintains the values in an internal table of string
definitions.
Format GEP(string$[,ERR=stmtref])
Where:
string$ Character string to convert to Even parity.
stmtref Program line number or label to transfer control to.
Description The GEP( ) function converts and returns the character string expression in Even
parity. This function is typically used when dealing with communication lines. It's
not normally used by the operating system since the standard communications
drivers handle the generation of parity.
The number of one-bits in each byte of the character string determines the parity of
data. Even parity data always has an even number of one-bits in each byte of data.
Format HSA(drive_num[,ERR=stmtref])
Where:
drive_num Numeric value representing the disc drive number.
stmtref Program line number or label to transfer control to.
Description ProvideX includes the HSA( ) function for compatibility with Business Basic
languages where it returns the highest sector number available on the disk drive
specified. Since this function is not applicable in ProvideX, it always returns 0 zero.
Description Depending on the format used, the HSH( ) function can return a hash value or a
encrypted/decrypted value for a given string.
Hash Types
An optional numeric value (Htype) can be applied to represent the type of hash to
return for the data. Supported hash types are defined by the associated Htype values
listed below.
Examples
To get a ProvideX hash of a string:
PRINT hta(hsh("An internal ProvideX Hash"))
83C9
To get a ProvideX hash of a string based on a key:
PRINT hta(hsh("An internal ProvideX Hash based on a Key","K1",0))
FCC2
To get an MD5 hash:
PRINT hta(hsh("A string to be MD5 hashed",1))
C9755C05F3EF1704114446A04F4072DF
To get or check a Message for Authentication based on HMAC-SHA1:
Data$="This is a string of data"
SHA1Hash$ = HSH(Data$,4)
MessageAuthenticationKey$ = HSH(Data$, SHA1Hash$,7,4)
IF KeyReceived$<>MessageAuthenticationKey$
THEN MSGBOX "Message has been tampered with"
Recognized Methods
Encryption/decryption methods (cypher$ values) are supported by ProvideX;
however, the OpenSSL libraries used may not have been created with all the
available algorithms. If the OpenSSL libraries do not have the requested function,
the result will be an Error #99: Feature not supported. In addition, it is up
to the software developer to understand how to use any particular algorithm.
Where:
DES Data Encryption Standard
DESx Variant of DES
Rc4 Rivest Cipher 4
Idea International Data Encryption Algorithm
Rc2 Rivest Cipher 2
Bf Blowfish
Cast5 Alogorithm designed using the CAST design procedure. AKA Cast-128
Rc5 Rivest Cipher 5
Cbc Cipher Block Chaining mode
Ecb Electronic Code Book mode
Ofb Output Feedback mode
Cfb Cipher Feedback mode
ede Encrypt-Decrypt-Encrypt mode
Ede3 Variation of EDE
Format HTA(string$[,ERR=stmtref])
Where:
string$ String expression to convert to hexadecimal format.
stmtref Program line number or label to transfer control to.
Description The HTA( ) function returns the hexadecimal value of a given character string. The
string returned by the HTA( ) function is always twice the length of the original
string and consists solely of the (hex) characters 0-9 and A-F.
Format HWN(chan[,ERR=stmtref])
Where:
chan Channel or logical file number of the terminal device whose highest unused
window number is to be reported (usually device (0) or the console)
stmtref Program line number or label to transfer control to.
Description The HWN( ) function returns an integer, reporting the highest unused window
number for a given file. If all window numbers are in use, this function will return
-1. If the file is not open or not a terminal, ProvideX returns Error #13: File
access mode invalid.
You can use the window number returned by the function in a subsequent
'WINDOW' mnemonic to create a new window. If no window number is passed to
the 'WINDOW' mnemonic, it will utilize the lowest unused window number.
The maximum number of windows allowed on a terminal device is 250.
Note: The HWN( ) function is affected by your setting for the 'B0' System Parameter,
p.652.
Description The I3E( ) function converts data to/from IEEE floating point format and ProvideX
internal values. The primary purpose of this function is to allow for the conversion
of data between ProvideX and other applications.
Format IND(chan[,fileopt])
Where:
chan Channel or logical file number of the file to reference.
fileopt Supported file options (see also, File Options, p.804):
ERR=stmtref Error transfer
END=stmtref End-Of-File transfer
KEY=string$ Record key
KNO=num | name$ File access key number (num) or name (name$)
RNO=num Record number
stmtref Program line number or label to transfer control to.
Description The IND( ) function returns the record index of either the next record in the file
specified or, on a Direct or Keyed file using the KEY= option, the record index for the
record identified by the key.
For Direct/ Keyed or Sort files without the KEY= option, the value returned is the
record index for the record with the next higher key value.
For variable length Direct/Keyed files, the value returned is an internal pointer to
the record.
For more information, see File Handling, p.97 in the User’s Guide.
Format INT(num[,ERR=stmtref])
Where:
num Numeric expression whose integer portion is to be returned.
stmtref Program line number or label to transfer control to.
Description The INT( ) function returns the integer portion of the value specified. No rounding is
performed on the value. The fractional part of the value is truncated.
Description The IOL( ) function returns the object code value of an IOList for either an open file or a
composite string variable. If the specified file or string variable does not have an associated
IOLIST, ProvideX returns Error #81: Invalid IOLIST specification.
Syntax Returns
IOL(chan:*) Returns the IOList for the file's embedded data dictionary
IOL(chan:^) Returns the alternate IOList
IOL(chan:KEY) Returns the IOList for the file's external key, if any.
Note: To convert the object code into a format you can display, pass it to the LST( )
function.
Format IOR(value1[$],value2[$][,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
value1[$] Compared values. String or numeric expressions/variables. If strings,
value2[$] value1$ must be the same length as value2$
Description The IOR( ) function performs a bit-wise logical 'OR' comparison of two string or
numeric expressions/variables, and generates a value as a result. The length of the
two string expressions must be equal or ProvideX returns an Error #46: Length
of string invalid.
Binary Result
0 IOR 0 0
1 IOR 0 1
0 IOR 1 1
1 IOR 1 1
Therefore
IOR($41$,$42$) yields Hex 43 01000011
IOR($41$,$25$) yields Hex 65 01100101
IOR($5A$,$DD$) yields Hex DF 11011111
Format JST(string$,len[,jstcode[$]][,char$][,ERR=stmtref])
Where:
char$ Optional string. Its first character is used to pad string$. If you omit
this, the default is to pad with blanks. String expression.
len Desired length of string. Numeric expression.
jstcode[$] Optional numeric or string parameter defining how to justify the
string:
0 or R Right justify.
1 or L Left justify - default.
2 or C Centre in string
If omitted, the string is left justified.
stmtref Program line number or label to transfer control to.
string$ String expression to be processed.
Description The JST( ) function converts a given character string (string$) to the length (len)
specified. It makes the string the desired length either by truncating the string$ or by
appending a defined pad character. The default is to pad with spaces.
If the length you specify is less than zero, ProvideX returns an Error #41:
Invalid integer encountered (range error or non-integer).
Examples The following code sample uses asterisks to justify a numeric value to a length of 30
characters:
00180 LET chq_amt=1.98,cust_name$="ACME INC."
00190 LET chq_amt$="*****"+JST(STR(chq_amt),30,"*")
00200 PRINT 'CS',@(0,5),"Customer name :",JST(cust_name$,20),"| ",
00210 PRINT @(0,6),chq_amt$
-:run
Customer name :ACME INC. |
*****1.98**************************
This example illustrates the use of alphnumeric versus numeric pad types in the JST( )
function:
Description The JUL( ) function is used to convert a date from year, month, day to a Julian date.
The Julian date is an integer: the number of days since the system base-date. By
default, in ProvideX this is January 1, 1970. Use the 'BY' system parameter to change
the base date.
Historically the true Julian calendar starts sometime around 4713 BC., but because of
errors in early calendars, dates prior to 1200 are not reliable. If you want the JUL( )
function to return dates based roughly on the Julian calendar, set the 'BY' system
parameter to 0 zero.
Note: To get the current Julian date, use the format JUL(0,0,0).
Examples The following example converts a given date to Julian format and calculates the
difference from the current Julian date:
0010 INPUT "Enter Date (MM/DD/YY):",X$:"00/00/00"
0020 LET M=NUM(X$(1,2))
0030 LET D=NUM(X$(3,2))
0040 LET Y=NUM(X$(5,2))
0050 LET N=JUL(Y,M,D,ERR=0100)
0060 PRINT "That is ",N-JUL(0,0,0)," days from now"
0070 STOP
0100 PRINT "Invalid date"; GOTO 0010
-:RUN
Enter Date (MM/DD/YY):03/31/99
That is 23 days from now
-:
In the following example, the JUL( ) function accepts a valid DAY string and returns
the corresponding Julian date:
X$="01/01/A0"
DAY_FORMAT "MM/DD/AA"
PRINT JUL(X$)
10957
PRINT DTE(10957:"%Y %Ml %D")
2000 January 1
JUL( ) can be used to determine if a given date is either Saturday or Sunday. Since
the JUL( ) function returns a day number, JUL (...) | 7 would provide a week day
number in the range 0-6. Depending on what is configured as the base year
(standard PVX is 1970, compatibility mode is 4714 BC) the day number changes; e.g.,
If 'BY'=1970,
Sun=3, Mon=4, Tue=5, Wed=6, Thu=0, Fri=1, Sat=2
The weekend can be tested as follows:
if ((jul(y,m,d)+3)|7)>=5 then <WEEKEND>
If 'BY'=0,
Sun=6, Mon=0, Tue=1, Wed=2, Thu=3, Fri=4, Sat=5
The weekend can be tested as follows:
if (jul(y,m,d)|7)>=5 then <WEEKEND>
Format KEC(chan[,fileopt])
Where:
chan Channel or logical file number of your given file.
fileopt Supported file options (see also, File Options, p.804):
ERR=stmtref Error transfer.
KNO=num | name$ File access key number (num) or name (name$).
stmtref Program line number or label to transfer control to.
Description The KEC( ) function returns the current record's key. The result is based on:
• the current file access key or,
• the access key specified using the KNO= option.
The current logical position is the last key value specified on a READ or EXTRACT
regardless of whether a record was found.
Typically, the KEC( ) function is used after you read a record, to determine the key of
the record you just read (i.e., the key of the current record or current position in the
file). For more information, see File Processing Functions, p.110 in the User’s
Guide.
Format KEF(chan[,fileopt])
Where:
chan Channel or logical file number of the file to reference.
fileopt Supported file options (see also, File Options, p.804):
END=stmtref End-of-File transfer
ERR=stmtref Error transfer
KNO=num | name$ File access key number (num) or name (name$)
stmtref Program line number or label to transfer control to.
Description The KEF( ) function returns the key of the first record in the file specified. The result
is based on:
• the current file access key or,
• the access key specified using the KNO= option.
The KEF( ) function can also be used in TCP (Transmission Control Protocol) to
identify local sockets. For more information, see File Processing Functions, p.110
in the User’s Guide.
Format KEL(chan[,fileopt])
Where:
chan Channel or logical file number of the file to reference.
fileopt Supported file options (see also, File Options, p.804):
END=stmtref End-of-File transfer
ERR=stmtref Error transfer
KNO=num | name$ File access key number (num) or name (name$).
stmtref Program line number or label to transfer control to.
Description The KEL( ) function returns the key of the last record in the file specified. The result
is based on:
• the current file access key or,
• the access key specified using the KNO= option.
ProvideX supports the KEL( ) function for ODBC files. For more information, For
more information, see File Processing Functions, p.110 in the User’s Guide.
Examples 0010 OPEN (1) "CUSTNO"
......
0100 F$=KEF(1),L$=KEL(1)
0110 PRINT "Customers range from ",F$,"->",L$
......
1010 END
Format KEN(chan[,fileopt])
Where:
chan Channel or logical file number of your given file.
fileopt Supported file options (see also, File Options, p.804):
END=stmtref End-of-File transfer
ERR=stmtref Error transfer
KNO=num | name$ File access key number (num) or name (name$).
stmtref Program line number or label to transfer control to.
Returns Key of the record that follows the next record in the file.
Description The KEN( ) function returns the key of the record which directly follows the next
record in the file specified. The result is based on:
• the current file access key or,
• the access key specified using the KNO= option.
For ODBC files, the KEN( ) function supports some debugging tools:
KEN (nn) Returns last generated SQL statement passed to the ODBC driver
KEN (nn, IND=1)Returns cursor name for database
KEN (nn, IND=2)Returns ODBC handles.
For more information, For more information, see File Processing Functions, p.110
in the User’s Guide.
Format KEP(chan[,fileopt])
Where:
chan Channel or logical file number of your given file.
fileopt Supported file options (see also, File Options, p.804):
END=stmtref End-of-File transfer
ERR=stmtref Error transfer
KNO=num | name$ File access key number (num) or name (name$).
stmtref Program line number or label to transfer control to.
Description The KEP( ) function returns the key of the record prior to the record in the file
specified. The result is based on:
• the current file access key or,
• the access key specified using the KNO= option.
If the current record is at the start of the file, there is no prior record. ProvideX
reports Error #2: END-OF-FILE on read or File full on write unless
you include an ERR= or END= option.
ProvideX supports the KEP ( ) function for ODBC files. For more information, For
more information, see File Processing Functions, p.110 in the User’s Guide.
Example 0010 OPEN (13)"CUSTNO"
0020 READ (13,KEY="zzz",DOM=30) ! Go to End of file
0030 LET K$=KEP(13,END=1000)
0040 READ (13,KEY=K$)R$
0050 PRINT "Key: ",K$," Data: ",R$
0060 GOTO 0030
1000 PRINT "Back to the start"
1010 END
Format KEY(chan[,fileopt])
Where:
chan Channel or logical file number of the file to reference.
fileopt Supported file options (see also, File Options, p.804):
END=stmtref End-of-File transfer
ERR=stmtref Error transfer
KNO=num | name$ File access key number (num) or name (name$)
IND=num Record index
RNO=num Record number.
stmtref Program line number or label to transfer control to.
Description The KEY( ) function returns the key of either the next record in the file specified or,
via the IND= or RNO= options, the key of the record at the index/record number
specified. The result is based on:
• the current file access key or,
• the access key specified using the KNO= option.
For more information, see For more information, see File Processing Functions, p.110
in the User’s Guide..
Format KGN([ext_key$],data$,key_def$,key_num[,ERR=stmtref])
Where:
ext_key$ Value of the external key. Optional. String expression.
data$ Contents of the data record. String expression.
key_def$ Key definition structure. String expression. This can be extracted using the
FIB( ) function at position 85 (in native ProvideX mode) or using the FIN( )
function at position 86 for a length of 385 (in BBx emulation mode.)
key_num Key number (primary or an alternate key) to extract. Numeric expression.
stmtref Program line number or label to transfer control to.
When comparing keys with descending segments, an application can specify the key
number as a negative value. In this case, the descending segments will be inverted so
that a logical compare will function properly.
Format LCS(string$[,ERR=stmtref])
Where:
string$ String expression whose lower case ASCII counterpart is to be returned.
stmtref Program line number or label to transfer control to.
Description The LCS( ) function returns the lower case counterpart of the original string (with all
upper case alphabetic characters replaced by their corresponding lower case characters).
Note: If you use an asterisk * instead of a string (i.e., LCS(*)) the function returns the
256 byte Lowercase Conversion Table.
Format LEN(string$[,ERR=stmtref])
Where:
string$ String expression whose length is to be returned.
stmtref Program line number or label to transfer control to.
Description The LEN( ) function returns an integer reporting the length of the given string. If the
given string is a null string ("") then the function returns a length of 0 zero.
Format LNO(num[,ERR=stmtref])
Where:
num Numeric value or variable representing the line number.
stmtref Program line number or label to transfer control to.
Description The LNO( ) function returns the line number of the line specified in its argument. This
can be used in an error handler to check where an error has occured; e.g.,
This can also help to resolve problems where line numbers are hard-coded in a
program and then the RENUMBER directive is used to change them.
Format LOG(num[,ERR=stmtref])
Where:
num Numeric expression whose base ten logarithm is to be returned.
stmtref Program line number or label to transfer control to.
Description The LOG( ) function returns the numeric base ten logarithm of a given number,
rounded to the current PRECISION setting. This is the inverse of the EXP( ) function.
ProvideX returns Error #40: Divide check or numeric overflow if the
numeric value is negative.
Format LRC(string$[,ERR=stmtref])
Where:
string$ Character string whose longitudinal redundancy checksum is to be
calculated.
stmtref Program line number or label to transfer control to.
Description The LRC( ) function returns the longitudinal redundancy checksum of a character
string. The longitudinal redundancy check of a character string is a one byte string
resulting from a logical XOR( ) comparison of all the characters in the string.
Formats LST([EDIT][*]internal$[,ERR=stmtref])
Where:
* Asterisk. Returns the listing in colourized syntax.
EDIT Keyword indicating that listing is to be returned with indented format.
internal$ Character string containing the internal (compiled) form of a ProvideX
statement. String expression; e.g., X$=LST(PGM(10)).
stmtref Program line number or label to transfer control to.
Description The LST( ) function converts a ProvideX statement from internal form to normal
source format. You must ensure that the string processed by the LST( ) function is a
statement in valid internal form. If it is not valid, ProvideX returns either Error
#30: Statement too complex -- cannot compile or Error #49: <*>
Internal program format error <*>.
Use the EDIT keyword to return a formatted statement and the asterisk * to display
colourized syntax (the 'CS' parameter must be on); e.g.,
X$=LST(EDIT *PGM(10)).
Note: There is a *CMD command line utility called COLOUR (or COLOR) that can be used
to display or alter the current settings. Typing COLOUR or COLOR at a ProvideX prompt
will display online help for this utility.
Description The MAX( ) function evaluates and returns the maximum (largest) value of the
numeric values or expressions specified. There is no limit to the number of values or
expressions that can be passed to the MAX( ) function.
Note: You can also use the ProvideX MAX( ) function to obtain statistical information
on ODBC data fields.
Note: This function is mainly for use with external functions; i.e., using the functions
DLL( ) Call Windows DLL, p.414.
Description The MEM( ) function provides direct access to memory location through the use of
pointers. ProvideX performs address validation and returns Error #41: Invalid
integer encountered (range error or non-integer) for an invalid
memory location.
Format MID(string$,offset[,len][,ERR=stmtref])
Where:
len Length of the substring.
offset Starting position of the substring. Numeric expression, integer. If the
integer is negative, the offset is taken from the end of the string.
stmtref Program line number or label to transfer control to.
string$ String expression whose hash value is to be returned.
Description Use the MID( ) function to extract a portion of a string. Using this function is similar
to using a substring, except that it can be used directly with the return value of a
function, variable or expression; e.g.,
In addition, if the offset is negative, ProvideX uses it as an offset from the end of the
string. For example, MID(X$,-1) is the last character of X$. If the length is negative,
then ProvideX uses it as the number of characters preceding the offset. That is,
MID("ABCD",-1,-1) returns C (the first character preceding the last character) and
MID("abcde",-2,-4) yields abc.
Example F_KSZ=DEC($00$+MID(FID(0),11,1))
Description The MIN( ) function returns the minimum (smallest) value of the numeric values or
expressions specified. There is no limit to the number of values or expressions that
can be passed to the MIN( ) function.
Note: You can also use the MIN( ) function to obtain statistical information on ODBC
data fields.
Format MNM(mnemonic$[,chan][,ERR=stmtref])
Where:
chan Channel or logical file number of the given file. If omitted, the default
is file 0.
mnemonic$ Name of defined mnemonic to look up, or the string value of the
mnemonic. String expression.
stmtref Program line number or label to transfer control to.
Description The MNM( ) function returns the defined command sequence for the specified
mnemonic on the file given. The command sequence is typically the exact
transmission string to handle the mnemonic for the file.
The mnemonic must have been predefined using the MNEMONIC directive. The
MNM( ) function returns a null string if the mnemonic has not been defined.
Example See if the terminal supports condensed print. If so, create window:
IF MNM('CP')=""
THEN PRINT 'WINDOW' (0,0,80,25),'CS',
ELSE PRINT 'WINDOW' (0,0,132,30),'CP','CS',
Formats MOD(num,base[,ERR=stmtref])
Where:
base Modulus base value. Numeric expression.
num Value for which to calculate the modulus. Numeric expression.
stmtref Program line number or label to transfer control to.
Description The MOD( ) function returns the modulus / remainder from a division of the first
expression by the second.
Note: You can also use the pipe | operator to return a modulus value. The syntax is
as follows: num|base,ERR=stmtref.
Description The MSG( ) function returns the text of the message whose number or key is
specified. Use this function to obtain more information about errors generated in
ProvideX by a program and to return information from your own message libraries.
Use the DEF MSG directive to temporarily override the MSG( ) function.
Examples The following examples illustrate the different uses for the MSG( ) function.
Example 1:
0010 OPEN (1,ERR=1000)"PRINTR"
0020 OPEN (2,ERR=1000)"CUSTOM"
0030 READ (2,KEY="",ERR=1000)R$
0040 ...
1000 PRINT "Could not open PRINTR",'LF',MSG(RET)
1010 STOP
Example 2:
KEYED "MESSAGE.LIB",20,0,-256
OPEN (1)"MESSAGE.LIB"
WRITE RECORD (1,KEY="NOCUST")"Sorry but Customer %1 is not valid"
CLOSE (1)
MESSAGE_LIB "MESSAGE.LIB"
PRINT MSG("NOCUST","0001")
Sorry but Customer 0001 is not valid
Example 3:
0010 ! Returns the current message library name, if any is in effect
0020 PRINT MSG(*)
Example 4:
Use this function to obtain the ProvideX error message associated with an error
number:
-:?msg(14)
Error #14: Invalid I/O request for file state
Format MSK(string$,mask$[,ERR=stmtref])
Where:
mask$ String containing the pattern / mask definition. If this value is null,
then the previously used pattern is reused. String expression.
stmtref Program line number or label to transfer control to.
string$ String to search. Maximum string size 8kb.
Description Use the MSK( ) function to scan a string looking for a specific pattern of characters.
The value returned is an integer reporting the starting offset of the longest string
matching the given mask or pattern. The pattern defines the mask as a regular
expression or series of characters, some of which have a special meaning. The
following table lists those characters and their meanings. Combinations are allowed.
The MSK( ) function returns the starting offset in the search string$ (where it
matches the pattern specified). The MSL system variable and TCB(16) return the
length of the string found.
Note: When the 'TL' (Thoroughbred LIKE) system parameter is OFF, the LIKE operator
uses the same pattern matching that MSK( ) does. With the 'OM' (Old Mask) System
Parameter ON, MSK( ) behaviour is compatible with the UNIX GREP command.
Here, MSK( ) reports the starting offset. (F, the 12th character, is the first uppercase
character.) MSL( ) reports the length of the string. (Foxxy is 5 characters long.)
Description The MXC( ) function returns an integer reporting the zero-based maximum number
of columns allowed for a file or device. MXL( ) returns an integer reporting the
zero-based maximum number of lines allowed for your given file or device. Use
these functions as a quick means to determine the size of the current display window
on a screen.
The functions MXC( ) and MXL( ) return the maximum available column and line
values for the channel based on the current default settings for paper size, printable
area, offset, margin, font and pitch.
Description This function returns the inverted value of a string or numeric (i.e., with all ON bits
turned OFF and vice versa).
Formats NUL(string$[,ERR=stmtref])
Where:
string$ String expression to be tested for null value.
stmtref Program line number or label to transfer control to.
Description The NUL( ) function returns a numeric status code. The value returned is 1 (true) if
the string expression is null or contains nothing but spaces. If the string contains
data other than spaces, then this function returns 0 (false).
Example In this example, the NUL( ) conditions force the user back to the prompts to put data
in mandatory fields:
0010 BEGIN
0020 INPUT EDIT "Enter your Name: ",N$
0030 IF NUL(N$) THEN PRINT "Your name is required. ",; GOTO 0020
0040 INPUT EDIT "Address: ",A$
0050 IF NOT(NUL(A$)) THEN GOTO 1000 ELSE GOTO 0040
1000 PRINT "DONE"; STOP
-:RUN
Enter your Name:
Your name is required. Enter your Name: IDA WANNA
Address:
Address:
Address: 123 ANY ST.
DONE
-:?nul(a$),nul(n$)
0 0
Formats NUM(string$[,ERR=stmtref])
Where:
string$ Character string whose value is to be converted to a numeric value.
Numeric in string expression (e.g., "19990317").
stmtref Program line number or label to transfer control to.
Description The NUM( ) function returns the numeric value of a numeric expression in a string
(e.g., 19990317 from "19990317"). The string is evaluated and converted to a
numeric value.
If your given string does not contain a valid numeric value, ProvideX returns an
Error #26: Variable type invalid. Your string expression can include any
number of the following valid characters: 0-9, a space, a comma, an equals sign, or a
dollar sign. You can also include one decimal point along with one sign character
(either '-' or '+').
NUM( ) always ignores the decimal point and thousands separator settings in the
'DP' and 'TH' system parameters.
Formats OBJ(ctl_id,ERR=stmtref)
Where:
ctl_id Control ID number that is assigned to each control when created. Numeric
expression. If 0 zero, information about the current window is returned
stmtref Program line number or label to transfer control to.
Description The OBJ( ) function returns a string containing information about a given custom
control object (i.e., BUTTON, LIST_BOX, etc.). If the control doesn't exist, ProvideX
returns an Error #65: Window element does not exist or already
exists. The example below shows what is returned for existing LIST_BOX 10.
The string returned by the OBJ( ) function contains 64 characters:
0020 LIST_BOX 10,@(10,10,60,10),FMT="L8 B2 L20 C10 N15 C3"
->?hta(obj(10))
00040000000A000A003C000A0000000000000978004E00CE01E40092004F009501E2009000000000
000000000000000000000000000000000000000000000000.
Format OPT(chan[,ERR=stmtref])
Where:
chan Channel or logical file number of the file to reference.
stmtref Program line number or label to transfer control to.
Description The OPT( ) function returns the value used in the OPT= option of the OPEN directive
for the given file. If the file referred to in the OPT( ) function is not open, ProvideX
returns an Error #13: File access mode invalid. If you omitted the OPT=
option for an open file, the OPT( ) function returns a null string.
Use this function primarily with device drivers to deal with such processes as
generating banners and multiple copies.
Format PAD(string$,len[,pad_code][,char$][,ERR=stmtref])
Where:
char$ Optional string. Its first character is used to pad string$. If you omit
this, the default is to pad with blanks. String expression.
len Desired length of string. Numeric expression.
pad_code[$] Optional parameter defining how to pad the string, either numeric
or string:
0 or L Pad on Left (right justify)
1 or R Pad on Right (left justify) - default
2 or C Centre in string
If omitted, the string is padded to the right.
stmtref Program line number or label to transfer control to.
string$ String expression to be processed.
Description The PAD( ) function converts a given character string (string$) to the length (len)
specified. It makes the string the desired length either by truncating the string$ or by
appending the defined pad character. The default is to pad with spaces.
If the length you specify is less than zero, ProvideX returns an Error #41:
Invalid integer encountered (range error or non-integer).
Examples The following code uses asterisks to pad a numeric value to a length of 30 characters:
00180 LET chq_amt=1.98,cust_name$="ACME INC."
00190 LET chq_amt$="*****"+PAD(STR(chq_amt),30,"*")
00200 PRINT 'CS',@(0,5),"Customer name :",PAD(cust_name$,20),"| ",
00210 PRINT @(0,6),chq_amt$
-:run
Customer name :ACME INC. |
*****1.98**************************
This code sample illustrates the use of alphnumeric versus numeric pad types in the
PAD( ) function:
0100 ! ^100 - PAD function
0110 Orig$="Test String",Char$=".",PadLen=20
0120 print 'LF',"Original String: "+@(24)+'BR'+Orig$+'ER'+'LF'
0130 Type=0,Type$="L"; gosub PadIt; print
0140 Type=1,Type$="R"; gosub PadIt; print
Format PCK(num[,size[,ERR=stmtref]])
Where:
num Numeric value to be packed.
size Integer from 1 to 8 specifying the number of characters in the resultant
string. If the value is too large for the size of the packed result, excess
digits on the left are discarded. If no size is included, then the default is 8.
stmtref Program line number or label to transfer control to.
Description PCK( ) is used to pack a numeric value into a string expression. It is the counterpart
of the UPK( ) function.
The packing algorithm used takes a numeric value and splits it into a series of two
digit values where each of the two digit values represents a number between 0 and
99. These numbers are then added to 32 to create the series of single-byte printable
characters that comprise the packed string. To unpack the value each byte of the
string has 32 subtracted from it and the resultant values become a series of 2-digit
values in the final result.
Should the value of any two-digit pair (when added to 32) equal or exceed the
standard file separator ($8A$), the value will be incremented by one when the
output string is created. When unpacking the string, any byte exceeding the field
separator will be reduced by one prior to subtracting 32.
Note: This function is not necessarily compatible with all Business Basics
Description The PFX( ) function returns the current value of your given prefix number. If no
prefix has been defined, the function will return a null string. If your specific prefix
has been disabled, ProvideX returns an Error #14: Invalid I/O request
for file state. (Use an ERR= option to transfer control on the error.)
You can obtain the PREFIX FILE value by using PFX(-1). The PFX system variable
contains the current PREFIX(0) value.
Formats PGM(lineno[,prog_level][,ERR=stmtref])
Where:
lineno Statement line number. Numeric expression. Use an integer from 1 to
64999. -1, -2, or -3 returns program names instead; see description below.
prog_level Optional numeric value indicating which program level to return.
stmtref Program line number or label to transfer control to.
Description The PGM( ) function returns a string containing the internal (compiled) format of a
given program statement number. If the line number is -1, the main (level 1)
program name is returned; -2 returns the current program name and -3 returns the
complete name of the program as specified on the CALL/LOAD/PERFORM or RUN.
If the statement number does not exist, and an ERR= option is specified, ProvideX
returns Error #21: Statement number is invalid and transfers control to
stmtref. If the statement number does not exist, and the ERR= option is omitted,
ProvideX returns the next higher statement.
Examples The following examples illustrate different uses for the PGM( ) function.
Example 1:
1030 SWAPTST:
2:
2:A$=PGM(-1)
2:B$=PGM(-2)
2:PRINT A$," | ",B$
C:\Program Files\Sage Software\ProvideX\PGM\PVX_MAINPR | C:\Program
Files\Sage Software\ProvideX\PGM\PVX_SUBPR
Example 2:
0010 ! testpgm.-3
0020 CALL PGN+";label1;additional info"
0030 STOP
0040 LABEL1:
0050 PRINT "pgm(-3)='",PGM(-3),"'"
0060 EXIT
pgm(-3)='C:\Program Files\Sage
Software\ProvideX\testpgm.-3;label1;additional info'
Example 3:
0380 REM
0390 INPUT "Enter statement to display OR <F4> to Stop: ",A
0400 IF CTL<>4 THEN LET X$=PGM(A,ERR=0440) ELSE GOTO 0430
0410 PRINT LST(X$)
0420 GOTO 0390
0430 PRINT "DONE"; STOP
0440 PRINT "Error Transfer Works"; STOP
64999 PRINT "Cannot find statement"; END
-:run
Enter statement to display OR <F4> to Stop: 400
0400 IF CTL<>4 THEN LET X$=PGM(A,ERR=0440) ELSE GOTO 0430
Enter statement to display OR <F4> to Stop: 7000
64999 PRINT "Cannot find statement"; END
Enter statement to display OR <F4> to Stop: <F4> (not printable)
DONE
-:run
Enter statement to display OR <F4> to Stop: 65999
Error Transfer Works
Format PRC(num[,precision][,ERR=stmtref])
Where:
num Value to be rounded. Numeric expression.
precision Precision to which to round. Optional. Numeric expression. Integer from 0
to 18. If omitted, rounding is done to the current precision in effect.
stmtref Program line number or label to transfer control to.
Description The PRC( ) function returns a given numeric value (num) rounded to the set
precision. If a precision parameter is supplied, the PRC( ) function rounds the value
based on the new precision. If precision is not supplied, then the value is rounded to
the current PRECISION in effect. .
Note: There is one exception to the above. A ROUND ON directive will truncate longer
values to the current PRECISION in effect.
If you use an invalid value (e.g., >18), ProvideX returns Error #41: Invalid
integer encountered (range error or non-integer).
Format PRM(param[,ERR=stmtref])
Where:
param Two-character valid system parameter code, enclosed in single quotes.
See the section on accepted system parameters. String expression.
stmtref Program line number or label to transfer control to.
Description The PRM( ) function returns the current value of the specified system parameter
unless the parameter is a switch. The following numeric status codes are returned for
a switch:
0 if the switch is off,
1 if the switch is on,
-1 if the specified parameter does not exist.
Examples This temporarily changes the 'BY' parameter to obtain a new date:
0100 PRINT "Valentine days.."
0110 LET SV_BY=PRM('BY')
0120 FOR Y=1999 TO 2009
0130 SET_PARAM 'BY'=Y
0140 PRINT DTE(31+14-1:"%Dl %Ml %D/%Y")
0150 NEXT Y
0160 SET_PARAM 'BY'=SV_BY
-:run
Valentine days..
Sunday February 14/1999
Monday February 14/2000
Wednesday February 14/2001
Thursday February 14/2002
Friday February 14/2003
Saturday February 14/2004
Monday February 14/2005
Tuesday February 14/2006
Wednesday February 14/2007
Thursday February 14/2008
Saturday February 14/2009
PRM( ) returns a specific parameter's current setting (or the Boolean value for a
switch):
->?prm('ah')
0
->set_param 'ah'
->?prm('ah')
1
The parameter’s status is returned even when it's hidden from the PRM variable's
contents listing:
->?prm('!i') ! hidden unless ON
0
Format PTH(chan[,ERR=stmtref])
Where:
chan Channel or logical file number of file whose pathname is to be returned.
stmtref Program line number or label to transfer control to.
Description The PTH( ) function returns the operating system path of the file specified. (The
value returned is an ASCII string reporting the full pathname, including directories
and the filename.) If the file is a device (e.g., a printer), the device name is returned.
Note: The file must be open for the PTH( ) function to operate.
Format PUB(index[,ERR=stmtref])
Where:
index Index in the ADDR table for the entry to be returned. Numeric expression.
stmtref Program line number or label to transfer control to.
Description The PUB( ) function returns a string reporting the names, starting addresses and sizes of
all programs for which the ADDR directive is active. The information is returned as a
character string containing the name and description of each program addressed.
The index indicates the relative program number in the ADDR table. ProvideX
updates the table to account for your subsequent ADDR and DROP directives and
changes index numbers accordingly (They're not static.) ProvideX returns Error
#41: Invalid integer encountered (range error or non-integer) if
no entry in the ADDR table exists for your given index.
The table below lists the contents of the string returned by the PUB( ) function:
Byte Contents
1 to 2 Program size in bytes
3 $01$
4 to 16 Reserved for ProvideX use
17 + Full Pathname to program
Format RCD(chan[,fileopt])
Where:
chan Channel or logical file number of file to reference.
fileopt Supported file options (see also, File Options, p.804):
DOM=stmtref Missing record transfer
END=stmtref End-Of-File transfer
ERR=stmtref Error transfer
IND=num Record index
KEY=string$ Record key value
KNO=num | name$ File access key number (num) or name (name$)
RNO=num Record number
Description The RCD( ) function returns the contents of either the next record in the given file or
of the record identified in a KEY=, RNO=, or IND= option. ProvideX effectively
issues a READ RECORD directive when it encounters this function and returns the
contents of the given record.
Format RDX(ascii$[,ERR=stmtref])
Where:
ascii$ Character string containing ASCII data. String expression.
stmtref Program line number or label to transfer control to.
Description The RDX( ) function is used to convert data from normal ASCII to Radix-40.
Conversion to Radix-40 compresses three characters (any of 0-9, A-Z, ., -, $, or space)
into two bytes of data (16 bits).
To convert data back to ASCII, use the inverse function, TRX( ).
Description The REC( ) function returns the name or contents of an IOList and can be used to
define a record prefix.
functions and directives return values based on a variable name for the record, e.g.,
LEN (X$) and PRINT X$.
You can also use a SEP=char$. Note that if you include both this and a REC= clause,
the REC= clause must precede the SEP= clause.
Example:
In the following example, ProvideX would place the input data in CUST.NAME$,
CUST.ADR1$ and CUST.ADR2$ using the IOList at line 0110 as a template (even
though there is no matching prefix in the IOList). That is, you can use the same
IOList as a template for different REC= prefix specifications.
0100 PRINT X$
0110 IOLIST NAME$,ADR1$,ADR2$
0120 INPUT EDIT "Name",@(9),": ",CUST.NAME$
0130 INPUT EDIT "Address 1: ",CUST.ADR1$
0140 INPUT EDIT @(8),"2: ",CUST.ADR2$
0150 LET X$=REC(IOL=0110,REC=CUST$)
0160 IF LEN(X$)>100 THEN PRINT "TOO-LONG"; GOTO 0120
0170 PRINT X$
-:run
BRETT'S BODYSHOP
123 SOME ST.
ANYTOWN SK S0M 0V0
The values are also displayed with the prompts below. The user edits to change
them:
Name : YVONNE'S BODYSHOP
Address 1: 123 SOME RD.
2: NEWTOWN SK S0M 0V0
YVONNE'S BODYSHOP
123 SOME RD.
NEWTOWN SK S0M 0V0
Description The REF ( ) function is used in Object Oriented Programming to control access to an
object by incrementing or decrementing the reference count. The DROP OBJECT
directive can also be used to destroy an object.
The system sets the reference count for any newly created object to 1 (one). If you plan to use
an object more than once, use REF (ADD obj_id) to increment the reference count.
When finished with an object, use REF (DROP obj_id) to decrement the reference
count. When the reference count becomes zero, the object is deleted.
Only objects whose reference count is 1 can be deleted. Once an object is destroyed,
its identifier may be re-assigned to another object. You should no longer use the
object identifier in your application, as it may reference a totally different object (if
the identifier is re-assigned).
All objects are destroyed when the application issues a START directive or if the END
directive is entered at command mode.
REF (READ obj_id) returns the current reference count value. All calls to REF( )
return the current reference count (or 0, if deleted).
Format RND(seed[,ERR=stmtref])
Where:
seed Numeric expression must be (or result in) an integer. The value of this
number is used to determine the result of the function.
stmtref Program line number or label to transfer control to.
Description The RND( ) function returns random numbers based on the seed given. The
following table describes the value returned based on the seed value:
>0 If seed is greater than 0 zero, the random number returned will be in the
range of zero to one less than the given number (to a maximum of 32768).
=0 If seed equals 0 zero, the random number returned will be between 0 and 1,
with PRECISION=8.
<0 If seed is less than 0 zero, RND( ) initializes the seed for generating the next
sequence of random numbers, similar to use of the RANDOMIZE directive.
When seed is 0 or greater, each call to the RND( ) function will yield a different random
number. Executing the RANDOMIZE directive and using the RND( ) function with a
negative value will produce similar results; e.g.,
RANDOMIZE 10 RANDOMIZE 10
?RND(-10) = ?RND(0) = ?RND
For further randomization, use RND(-TME) as a method to re-initialize the seed value.
Note: ProvideX returns an error when seed is greater than 2147483647 or is not a valid
integer.
Format RNO(chan[,fileopt])
Where:
chan Channel or logical file number of the file to reference.
fileopt Supported file options (see also, File Options, p.804):
END=stmtref END-OF-FILE transfer
ERR=stmtref Error transfer
IND=num Record index
KEY=string$ Record key
KNO=num | name$ File access key number (num) or name (name$)
Description The RNO( ) function reports the position in the file specified of either the next record, or
the record identified in the KEY= or IND= options. The RNO( ) value is the absolute
ordinal position of the record in the file. The first record in a file returns a value of 1
(one), the second RNO( ) value is 2, and so on. In a Keyed file, the record number
depends on the key chosen and its value relative to all other records in the same file.
Note: ProvideX supports the RNO( ) function for ODBC files. See File Processing
Functions, p.110 in the User’s Guide.
Format SEP(chan)
Where:
chan Channel or logical file number of an OPEN file.
Returns Either the SEP value (single character string) for an OPEN file on given channel or ""
(null).
Description The SEP( ) function returns either a single character string, SEP (the field separator
value in hex) for a given file OPEN on a given channel, or "" (null).
The value returned is the value you set in the SEP= option when creating a Keyed or
Indexed file (a single character string which can be anything from $00$ to $FF$).
The function returns "" (null) for a dynamic field separated file (a Keyed or Indexed
file created using a SEP=* option). With this type of file, ProvideX stores each field
in the record with a one-byte prefix identifying the type and length of data that
immediately follows.
Format SGN(num[,ERR=stmtref])
Where:
num Value whose sign is to be returned. Numeric expression.
stmtref Program line number or label to transfer control to.
Description The SGN( ) function returns a numeric status code for the sign of a value:
1 If num is greater than zero.
0 If num equals 0 zero.
-1 If num is less than zero.
Format SIN(num[,ERR=stmtref])
Where:
num Value whose sine is to be returned. Numeric expression.
stmtref Program line number or label to transfer control to.
Description The SIN( ) function returns the sine of the numeric expression specified. It will return
a numeric value between -1 and 1, rounded to the current PRECISION in effect. Its
inverse function is ASN( ).
Format SQR(num[,ERR=stmtref])
Where:
num Value whose square root is to be returned. It must be a positive
number. Numeric expression.
stmtref Program line number or label to transfer control to.
Description The SQR( ) function returns the square root of the number provided, rounded to
current PRECISION. If you use an invalid value (e.g., a negative value such as
SQR(-2.345)), ProvideX returns an Error #40: Divide check or numeric
overflow.
Description The SRT( ) function returns a sorted character string. The string elements are
internally sorted into ascending sequence. The order of duplicate elements is
undefined.
Note: To sort a string into descending order, use the NOT( ) function to invert the bits
in the string prior to and after sorting. (See NOT( ) Invert String Bits/Logical
Condition, p.486.)
If each element in the string is the same fixed length, use this format to sort the
string.
Examples:
0100 REM To sort in ascending order:
0110 A$="0231405242670291234403242"
0120 PRINT SRT(A$,5)
->RUN
0231403242052421234467029
0200 REM To sort in descending order:
0220 PRINT NOT(SRT(NOT(A$),5))
->RUN
6702912344052420324202314
If each element in the string has a delimiter or SEP character, use this format to sort
the string. ProvideX considers the first character of dlm_char$ to be your delimiter.
(The default is the current SEP value.)
Example:
0300 REM To sort with delimited strings:
0310 A$="THE BROWN FOX JUMPED OVER THE DOG " ! Blank as delimiter, ends string
0320 PRINT SRT(A$," ")
->RUN
BROWN DOG FOX JUMPED OVER THE THE
Format SSZ(drive[,ERR=stmtref])
Where:
drive Disk drive whose sector size is to be returned (ignored). Numeric
expression.
stmtref Program line number or label to transfer control to.
Description The SSZ( ) function has been provided for compatibility with Business Basic
systems. In ProvideX, it always returns 256.
Format STK(level[,ERR=stmtref])
Where:
level Program CALL stack level. Numeric expression.
string$ String expression to be processed.
Note: You can use PRM('B0') to circumvent a potential problem should the base
level be level 0, rather than 1.
Example The following code sample illustrates stripping of left, right, both, all as well as the
use of "*" to indicate a list of characters:
0100 ! ^100 - STP function
0110 Orig$="...Test...String...",Char$="."
0120 print 'LF',"Original String: "+@(21)+'BR'+Orig$+'ER'+'LF'
0130 Strip=0,Strip$="L"; gosub StripIt; print
0140 Strip=1,Strip$="R"; gosub StripIt; print
0150 Strip=2,Strip$="B"; gosub StripIt; print
0160 Strip=3,Strip$="A"; gosub StripIt
0170 !
0200 ! ^100 - Strip multiple characters
0210 Orig$="xxx Test.zzz String yyy"
0220 print 'LF',"Original String: "+@(25)+'BR'+Orig$+'ER'
0230 !
0240 Char$="xyz.",Strip=3,Strip$="A"
0250 print "STP(Orig$,"+quo+Strip$+quo+",*"+quo+Char$+quo+") = ",
0260 print 'BR'+stp(Orig$,Strip$,*Char$)+'ER'
0270 stop
0280 !
0300 ! ^100
0310 StripIt:
0320 print "STP(Orig$,"+pad(str(Strip),3,2)+","+quo+Char$+quo+") = ",
0330 print @(21)+'BR'+stp(Orig$,Strip,Char$)+'ER'
0340 print "STP(Orig$,"+quo+Strip$+quo+","+quo+Char$+quo+") = ",
0350 print @(21)+'BR'+stp(Orig$,Strip$,Char$)+'ER'
0360 return
Description The STR( ) function converts and validates strings. Add a format mask to specify the
size and format of the resultant character string. When a format mask is included,
STR( ) returns a string value converted from numeric using the default decimal point
and thousands separator set by 'DP' and 'TH'. If the format mask is omitted, 'DP' and
'TH' settings are ignored.
Examples The following will print **OverFlow** if the value is too large for the mask:
x=1234567890.12
PRINT STR(x:"####,##0.00-","**OverFlow**") ! Yields **OverFlow**
If value is too large with pennies, we’ll try it without the pennies, or else print
**OverFlow**:
x=1234567890.12
PRINT STR(x:"####,##0.00-",str(x:"####,###,##0","**OverFlow**")) ! Yields
1234,567,890
Format SUB(string$,search$,replace$[,instance])[,ERR=stmtref])
Where:
instance Optional. Integer. Which occurrence to find:
0 All occurrences (assumed if not given).
>0 Specific occurrence, searching left to right within string$; i.e.,
1=first occurrence, 2=second occurrence ...
<0 Specific occurrence, searching from right to left; i.e., -1=first
occurrence from end of string$, -2=second occurrence from
end of string$ ...
search$ Value for which to search. String expression. Cannot be null.
replace$ Text to replace the original search text, if found. String expression. You
must include a replace value, but the value can be null; e.g.,
SUB(A$,B$,"",0,ERR=100).
stmtref Program line number or label to transfer control to.
string$ String expression containing the string in which to search-and-replace
and perform the substitution.
Description The SUB( ) function performs a substitution within a string. The search value can't
be null. (That generates an Error #46: Length of string invalid.) If no
substitutions occur, no error is generated.
Format SWP(string$[,swp_code][,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
string$ String expression whose bytes are to be swapped.
swp_code Type of byte-swapping to be performed. Numeric expression. See the
chart below.
Returns Conversion of data, native machine format to/from ProvideX common format.
Description The SWP( ) function is designed to simplify the conversion of data between native
machine format and ProvideX common format. ProvideX processes data with the
most significant information to the left (i.e., you read the data from left to right)
where some computers store data with the most significant data at the right.
The SWP( ) function gives you a convenient way of rearranging the data so it can be
exchanged. If you do not supply a swap type, the function will rearrange the data
according to the native operating mode of the machine. For example, on INTEL
80x86 CPUs, a SWP( ) of "12345678" yields "87654321".
Unfortunately not all swapping algorithms are this easy. Some computers swap
every two characters, some every four characters and some every eight characters.
The following table describes the various types of swapping based on a value of
"12345678".
Note: For compatibility mode, the swap type can be provided as a single byte
containing the binary value of the desired type; i.e., $01$, $02$, ...
Description The SYS( ) function passes a given string or numeric Process ID to the operating
system command processor for execution.
Format TAN(num[,ERR=stmtref])
Where:
num Numeric expression whose Tangent will be returned.
stmtref Program line number or label to transfer control to.
Description The TAN( ) function returns the Tangent of a given numeric expression. The numeric
value returned will be rounded to the current PRECISION in effect. The inverse
function is ATN( ) Return Arc-Tangent, p.395.
Description The TBL( ) function converts a string (all characters or all numeric) to the
corresponding values set in a given translation table.
Examples Example 1:
T$="W"
P$=TBL(POS(T$="DWM"),"???","Daily","Weekly","Monthly")
?P$
Weekly
Example 2:
PRINT "Expires:",TBL(EXP_DT$="",EXP_DT$,"Never")
If EXP_DT$ is null, the logical expression EXP_DT$=" " yields 1. A null date will
print "Never". Otherwise, it yields 0 zero and the value of EXP_DT$ is printed. In
effect, this form of TBL( ) becomes: TBL(logical_expr, else_value,true_value).
Example 3:
let string$="ABCDEFG 123"
newstring$=tbl(string$,"ACF ","123_") ! newstring$ is "1B2DE3G_123"
Description The TCB( ) function returns information for several different purposes. A single tcb_code
specified in the TCB( ) function returns a corresponding system control value – see
Format 1: Return Task Information. Two numeric codes (pkg_index,info_reqd) are
required for activation/licensing information – see Format 2: Return Activation
Information. Specific keywords are used to return specific information from the OS -
See Format 3: Return Platform/User Information.
These keywords are used together with a user ID arg to return information
associated with a specific user in a UNIX/LinuX environment:
"OS_GetUserUID" User ID.
"OS_GetUserGID" Group ID
"OS_GetUserName" User name.
"OS_GetUserHome" Home directory
"OS_GetUserShell" Shell directory.
The above keywords are only valid under UNIX and Linux and will currently return
null in a Windows environment.
Examples:
PRINT TCB("OS_GetUserUID","johndoe")
500
PRINT TCB("OS_GetUserGID","johndoe")
501
PRINT TCB("OS_GetUserName","johndoe")
Johnathan Doe
PRINT TCB("OS_GetUserHome","johndoe")
/home/johndoe
PRINT TCB("OS_GetUserShell","johndoe")
/bin/bash
Format TMR(tmr_code[,ERR=stmtref])
Where:
tmr_code Value indicating what type of information to be returned. Numeric
expression, integer range 0 to 2. See the description below.
stmtref Program line number or label to transfer control to.
Description The TMR( ) function can initialize the timer (to zero) and return the time difference in
seconds or hours since the last initialization. The TMR( ) function is used as follows:
TMR(0) Returns the difference in seconds since the last TMR(0) and resets the
timer to 0.
TMR(1) Returns the difference in seconds since the last TMR(0).
TMR(2) Returns the difference in hours since the last TMR(0).
Format TRX(rdx_40$[,ERR=stmtref])
Where:
rdx_40$ Character string containing Radix-40 data.
stmtref Program line number or label to transfer control to.
Description The TRX( ) function converts data from Radix-40 to normal ASCII. The input to this
function is generally the result of a call to the RDX ( ) function, which performs the
inverse of converting ASCII to Radix-40. Radix-40 lets you compress three characters
into two bytes of data (16 bits).
The compression algorithm only supports the characters A-Z, 0-9, ., -, $ or space.
Lower case letters are converted to their uppercase equivalent. All other characters
are replaced with spaces.
Format TSK(num[,ERR=stmtref])
Where:
num Desired index entry in the internal task table. Numeric expression,
range 0 to n.
stmtref Program line number or label to transfer control to.
Description The TSK( ) function returns a string value from the internal task table. The returned
table entry is determined by the task number specified, num. An error is generated if
the entry has not been set up in the task table (using a SETDEV TSK( ) directive).
Note: An argument of -1 always returns "[Pvx" which is the internal header for files.
Format TXH(string$[,chan][,ctrlopt])
Where:
chan Channel or logical file number of the device.
ctrlopt Control options. Supported options for TXH( ) include:
ERR=stmtref Error transfer
FNT="font",size[,attr]" Font name, size, properties
SIZ=num
string$ String expression.
Returns Text height in graphical units (i.e., @X(col) and @Y(line) values).
Note: For use in graphics mode along with TXW( ) Text Width, p.541.
Description The TXH( ) function returns text height in graphical units for the given string$. By
default, if no SIZ= is specified, this function returns the height of a single line of text
in either the font specified or the current font on the device specified by chan.
If you set a size, TXH( ) returns the height required to print your given text with no line
exceeding the size (with word wrap enabled). The SIZ= option thus can be used to
determine the height of the text.
If the font selected indicates that the ampersand character is used to denote underscored
characters, TXH( ) does not include & during its calculations.
If chan is omitted, ProvideX assumes it is dealing with the main window.
Example 0900 PRINT 'CS'
1000 LET R$="Hello World"
1001 LET W=TXW(R$) ! Get width of text
1002 IF W>@X(40) THEN LET W=@X(40) ! Force <= 40 columns
1010 LET H=TXH(R$,SIZ=W) ! Make it fit in width
1020 PRINT 'TEXT'(@X(20),@Y(5),@X(20)+W,@Y(5)+H,R$,"W")
Format TXW(string$[,chan][,ctrlopt])
Where:
chan Channel or logical file number of the device.
ctrlopt Supported options for TXW( ) include:
ERR=stmtref Error transfer
FNT="font,size[,attr]" Font name, size, properties
SIZ="wrapwidth" Word wrap to maximum width
string$ String expression.
Returns Text width in graphical units (i.e., @X(col) and @Y(line) values).
Note: For use in graphics mode along with TXH( ) Text Height, p.540.
Description The TXW( ) function returns text width in graphical units for the given string$. If
chan is omitted, ProvideX assumes it is dealing with the main window.
If the font selected indicates that the ampersand character is used to denote underscored
characters, TXW( ) does not include & during its calculations.
Example If you want to create a window based on the length of a message, use TXW( ) to determine
the size of the window/dialogue to create; e.g.,
0055 LET LINE1$="Line 1."
0056 LET LINE2$="Line 2.."
0057 LET LINE3$="This is Line 3..."
0100 LET W1=TXW(LINE1$,FNT="MS Sans Serif")
0110 LET W2=TXW(LINE2$,FNT="MS Sans Serif")
0120 LET W3=TXW(LINE3$,FNT="MS Sans Serif")
0130 LET W=MAX(W1,W2,W3)
0140 LET W=INT(W/16)+4 ! Allow for up to 4 extra white spaces
0150 PRINT 'DIALOGUE'(C,L,W,5,TITLE$),'SR','CS',
0160 PRINT 'FONT'("MS Sans Serif"),
0170 PRINT 'TEXT'(@X(2),@Y(1),LINE1$),
0180 PRINT 'TEXT'(@X(2),@Y(2),LINE2$),
0190 PRINT 'TEXT'(@X(2),@Y(3),LINE3$),
0200 MSGBOX "Press OK to continue."
Note: The logical width is always 16 times the column number. In the 'TEXT'
mnemonic, if you omit end points, the system will calculate them.
Format UCS(string$[,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
string$ String expression whose upper case ASCII counterpart is to be returned.
Description The UCS( ) function replaces all lower case ASCII characters in a given string with
their corresponding upper case values.
See Also LCS( ) Return Lowercase String, p.468
DEF systab= Directives, p.73
Note: If an asterisk * is passed to the UCS( ) function instead of a string, the function
returns the 256-byte Uppercase Conversion Table.
Format UCP(string[,ERR=stmtref])
Where:
string Original data to expand (uncompress).
stmtref Program line number or label to transfer control to.
Description The UCP( ) function expands a string that has been compressed using the CMP( )
function. For a usage example, refer to the CMP( ) Function, p.400. TCB(195) will
return 1 if ZLib support is available.
Note: Since the CMP( ) and UCP( ) compression routines are not supported on all
platforms, systems using these functions may not be fully portable.
Format UPK(string$[,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
string$ String expression whose value represents a packed number.
Returns Numeric expression of whose value has been packed into a string.
Description UPK( ) is used to convert a packed string into its numeric value. It is the counterpart
of the PCK( ) function.
The packing algorithm used takes a numeric value and splits it into a series of two
digit values where each of the two digit values represents a number between 0 and
99. These numbers are then added to 32 to create the series of single-byte printable
characters that comprise the packed string. To unpack the value each byte of the
string has 32 subtracted from it and the resultant values become a series of 2-digit
values in the final result.
Should the value of any two-digit pair (when added to 32) equal or exceed the
standard file separator ($8A$), the value will be incremented by one when the
output string is created. When unpacking the string, any byte exceeding the field
separator will be reduced by one prior to subtracting 32.
Note: This function is not necessarily compatible with all Business Basics
Note: You can use the optional ERR=stmtref with each of the syntax formats
described. The inner set of brackets enclosing [,subscr] are part of the syntax.
Description The VIN( ) function returns the numeric value (contents) of a variable where the
name of the numeric variable is stored in a string variable. The VIS( ) function
returns the string value (contents) of a string variable whose name is stored in a
string variable.
Format XEQ(subprog$,expression,arg1,arg2,…[,ERR=stmtref])
Where:
arg1,arg2... Comma-separated list of arguments to pass to the subprogram.
expression Expression will be evaluated after the call and used as the return
value for the function.
subprog$ Name of the subprogram to call. Maximum string size 8kb.
stmtref Program line number or label to transfer control to.
Description The XEQ( ) function executes an in-line CALL directive. When ProvideX encounters
the XEQ( ) function, the subprogram named in the function will be called with any
arguments supplied. When the subprogram exits, the XEQ( ) function evaluates the
expression and returns it.
The primary advantage of XEQ( ) is in single-line Global functions. Consider the
following:
Was: 0010 CALL "GETDTE",DT,DATE$
0020 PRINT "Date:",DATE$
Now: 0010 PRINT "Date:",XEQ("GETDTE",_D$,DT,_D$)
Or, you could define a Global function in a startup program:
DEF FN%DTE$(_DT)=XEQ("GETDTE",_D$,_DT,_D$)
Then: 0010 PRINT "Date:",FN%DTE$(DT)
Format XFA(varlist[,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
varlist List of variables in the string template.
Description The XFA( ) function returns extended field attribute information stored in a string
template:
Format Returns
XFA(var," ") A list of variables.
XFA(var,"fieldname") Description of the field.
XFA(var,"fieldname","userfield") User-defined portion of the field.
Do not do this:
0120 DIM CST$:IOL=0130 REM does NOT create a valid string template for XFA( )
0130 IOL=NAME$,ADDR$,CITY$,ZIP$ REM valid IOL for the composite string above
0140 REM But XFA(string above) generates Error #26: Variable type invalid
0150 REM
Apply this instead:
0170 REM XFA( )is for use with other Business Basics' string template formats
0180 LET J$="B JONES",K$="23 SOME ST.",L$="MYCITY",M=78923
0190 DIM CST$:"NAME:C(20*),ADDR:C(30*),CITY:C(20*),ZIP:N(10*):type=cur"
0200 LET CST.NAME$=J$
0210 LET CST.CITY$=K$
0220 LET CST.ADDR$=L$
0230 LET CST.ZIP=M
0240 REM
0250 PRINT XFA(CST$,"")
0260 PRINT XFA(CST$,"NAME")
0270 PRINT XFA(CST$,"ZIP","type")
-:END
-:RUN
NAME
ADDR
CITY
ZIP
_À
cur
-> HTA(XFA(CST$,"NAME"))
01C00A0001000100000014
The hex string of the XFA( ) function in the previous example reports the following
information about the string template field attributes.
Format XOR(value1[$],value2[$][,ERR=stmtref])
Where:
stmtref Program line number or label to transfer control to.
value1[$] Compared values. String or numeric expressions/variables. If strings,
value2[$] value1$ must be the same length as value2$
Description The XOR( ) function performs a bit-wise exclusive 'OR' comparison of two string or
numeric expressions/variables, and generates a value as a result. The length of the
two string expressions must be equal or ProvideX returns an Error #46: Length
of string invalid.
Binary Result
0 XOR 0 0
1 XOR 0 1
0 XOR 1 1
1 XOR 1 0
System Variables
BKG GID NAR SID
CHN HFN NID SSN
CTL HLP PFX SYS
DAY HWD PGN TIM
DLM LFA PRC TME
DSZ LFO PRM TMS
EOM LIP PSZ TSM
ERR LPG QUO UID
ERS LWD RET UNT
ESC MSE RND WHO
GFN MSL SEP
Overview
Overview BMK
This chapter provides an alphabetically arranged list of all the system variables in
ProvideX. Each definition includes the correct syntax (showing associated
parameters), values returned, a general description, examples, and sometimes a
cross reference to related documentation. The list begins on the following page.
Note: All system variables have reserved three-character names. To avoid potential
conflicts with the reserved list (since ProvideX might include more three-character
variables in the reserved list in future) it is best not to use three-character variable
names in your applications.
Description The BKG variable contains the following numeric status codes:
Examples ->?BKG
0
Description This system variable contains a listing of all currently open channels. The value
returned is a string of numeric two-byte values. The CHN variable indicates channel
values below 65000.
->?HTA(CHN)
0000001E
->?(LEN(CHN)/2)-1
Yields the number of files opened.
Description The CTL system variable contains a numeric code (integer) that represents a signal of
user input from the keyboard or mouse. From the keyboard, this code represents
how the user ended the last INPUT statement; i.e.,
0 Enter key (normal)
1-4 F1 to F4 keys
5 Input terminated due to SIZ= option
6 - 12 F6 to F12 keys
Positive CTL values (in the range 0 to 32767) represent function keys as well as
user-defined control signals that are to be returned to the application. Negative CTL
values are handled internally by ProvideX – see Negative CTL Definitions, p.811.
Description The DAY variable contains the current system date (e.g., 11/15/00), in a format
based on the date style set in the DAY_FORMAT directive (MM/DD/YY by default).
Changes in DAY_FORMAT are reflected in the value returned in the DAY variable.
Description This system variable contains the operating system's directory delimiter (e.g., "/"...
for UNIX, "\"... for Windows). For example, on a Windows PC:
->?DLM
\
Tip: Use SEP=DLM when reading directories (e.g., in list boxes) to have ProvideX
append the operating system delimiter to subdirectory names.
Description The DSZ variable contains a numeric value that indicates the size (in bytes) of the
available data work space for the user. You can set the size value either in the START
directive or as an argument in the ProvideX command (using -SZ).
Examples ->?DSZ
291094
Description This system variable contains the End-Of-Message character string that ended the
user's last input from the terminal. The contents of this variable will vary based on
the type of terminal being used.
Description The ERR variable contains a numeric value (integer) that indicates the last
system-detected error. It is reset by the BEGIN, CLEAR, END, RESET, STOP, and
START directives. See Error Codes and Messages, p.822, for a complete list of codes.
Examples In the following example, the "TEST" file is already open:
Description This ERS variable contains the line number that generated the last error detected in
the program.
Description This system variable contains the ASCII escape character $1B$.
Examples ->?HTA(ESC)
1B
->
Description The GFN variable contains a numeric value (integer) representing the highest
available (i.e., not open) global file channel. This value will be in the range: 64 to 127
(32768 to 65000 if the 'XF' system parameter is set).
Description This system variable can be used to obtain a two-character 16-bit binary operating
system group or Process ID (PID).
Description The HFN variable contains a numeric value (integer) representing the highest
available local channel/file number. This value will be in the range: 0 to 63 (0 to
32767, if the 'XF' system parameter is set).
Examples ->?HFN
63
->SET_PARAM -'XF'
->?HFN
32767
Description This system variable contains the HLP= value specified in the last INPUT or OBTAIN
directive. If the HLP= option is omitted, this variable contains a null string.
Description The HWD variable contains the name of the directory that was current at start up
(when ProvideX was initialized). This is considered the home directory.
Examples ->?HWD
C:\Program Files\Sage Software\ProvideX
Description This system variable indicates the channel of the last file or device accessed. The
value is 0 zero if the last device was the console/user's terminal.
Examples ->?LFA
0
Description This system variable indicates the channel/file number of the last file opened.
Description The LIP variable indicates the screen position (i.e., the column and line numbers at
the intersection) where the last user input occurred. This information is used by the
Help/Query subsystem.
Examples ->?LIP
0212
Description This system variable contains the name of the lead program; i.e., the program that
started the current ProvideX session or the last program specified in the START directive.
See Also ProvideX Installation Guide, Launching ProvideX
Examples ->?LPG
start.win
Description This system variable contains the full pathname of the current working directory.
Examples ->?LWD
C:\Program Files\Sage Software\ProvideX
->
Description This system variable contains a 32-byte string that describes the current state of the
mouse. The following table shows the positions of all mouse attributes represented
in the MSE string:
Description The MSL variable contains a numeric value (integer) that indicates the length of the
string that matched the last MSK( ) function. TCB(16) also reports the length of the
string.
See Also MSK( ) Function, p.482,
TCB( ) Function, p.530.
Description This system variable contains a numeric value (integer) representing the number of
arguments in the ProvideX command that launches ProvideX (e.g., in using a batch
file or from a command statement).
See Also ARG( ) Function, p.391,
ProvideX Installation Guide, Launching ProvideX
Example --> PVX -SZ=20 -ARG TOM JONES
->?NAR
2
Description The NID variable contains the network identifier. Under UNIX, this variable contains
the network node name.
Description This system variable indicates the current settings of the PREFIX directive (for
PREFIX entry 0).
Example ->?PFX
\PGMS\===\ \PGMS\====\ \PGMS\CUST\CASHRCPT\ \PGMS\CUST\MSC\ \PGMS\CUST\SALES\
Description This system variable contains the name of the currently loaded program, complete
with its full operating system pathname.
Note: There is one exception to the above. If you have the 'OP' (original program)
system parameter set to ON, PGN returns only the program name (i.e., without an
expanded pathname).
Description This system variable contains a numeric value (integer) that indicates the current
PRECISION in effect (except in scientific notation). This value will be in the range: -1
to 18. The default is 2 (two digits to the right of the decimal point).
If the mode is FLOATING POINT, then the value returned is in scientific notation.
Either a PRECISION -1 statement or a FLOATING POINT directive will activate
scientific notation. The PRECISION directive cancels it.
Description This system variable contains a comma-delimited string listing the current settings
of OS parameters for ProvideX use. See also Chapter 6. System Parameters, p.649.
Some parameters only appear in the list when set, and some are OS specific.
Description This numeric system variable indicates the current program size in bytes.
Example ->?PSZ
2605
Description This string system variable contains the ASCII quote character (").
Description This numeric system variable returns an integer reporting the operating system's
error code associated with the last operating call. ProvideX generates this value by
adding 256 to the error code value in the ERR system variable.
Example -: PRINT "RET = ",RET
RET = 258
Description This system variable contains a different random number each time you use it to
return a value. The value will be in the range from 0 to 1, with a PRECISION of 8.
Example 0010 FOR I=1 TO 3
0020 PRINT RND,
0030 NEXT
0040 PRINT " DONE"; END
-:run
0.76559375 0.5199119 0.9505763 DONE
Description This string system variable indicates the record field separator; the ProvideX default is
$8A$). Note that when you WRITE using an IOList, SEP is the field delimiter.
Description This system variable contains the system identification code as defined by the
operating system.
Example ->?SID
MSDOS
->
Description This system variable contains a sixteen character system software identifier. The first
4 characters report the version number, characters 6-8 report the machine
classification, and 10-16 report the software serial number.
Example ->?SSN
0510-001-1234567
->
Description This string system variable contains the name of the operating system.
Example ->?SYS
MS-WINDOWS
Description This system variable returns the current system time in hours past midnight. The
TME and TIM variables are identical.
Description This system variable returns the current system time in hours past midnight. The
TME and TIM variables are identical.
Description The TMS variable contains a numeric value (integer) indicating the current number
of seconds that have passed in the current minute according to the operating
system's clock. This value will be in the range: 0 to 60.
Example ->?TMS
15
Description This system variable indicates the error status of the currently running program.
(This is included in ProvideX primarily for compatibility with other Business Basics.)
Its contents are as follows:
(1,1) "0"
(2,16) Name of program with last error. Padded with nulls.
(18,5) Line with error
(23,5) Error status
(28,5) Operating system error code
Description This system variable contains the current UserID. On systems without user
registration, it returns the value of the environment variable USER or the Network
UserID. The UID and WHO variables are identical.
Description The UNT system variable contains the lowest available channel/file number.
Description This system variable contains the current UserID. On systems without user
registration, it returns the value of the environment variable USER or the Network
UserID. The UID and WHO variables are identical.
Mnemonics
'@@' 'Cn' 'EM' 'JR' 'PICTURE' '+T' & '-T'
'+$' & '-$' 'CAPTION' 'EO' 'JS' 'PIE' 'TEXT'
'2D' 'CE' 'EP' 'L6' 'PM' 'TEXTWDW'
'3D' 'CF' 'ER' 'L8' 'POLYGON' 'TR'
'4D' 'CH' 'ES' 'LC' 'POP' 'TW'
'AB' 'CI' 'ET' 'LD' 'PS' '+U' & '-U'
'ARC' 'CIRCLE' 'EU' 'LF' 'PUSH' 'UC'
'AT' 'CL' 'EW' 'LI' '*R' 'UP'
'+B' & '-B' 'COLOUR' '+F' & '-F' 'LINE' 'RB' '+V' & '-V'
'Bn' '_COLOUR' 'Fn' 'LM' 'RC' 'VT
'BACKGR' 'CP' 'FF' 'LPI' 'RECTANGLE' '!W''
'BB' 'CPI' 'FILL' 'LT' 'RED' '+W' & '-W'
'BE' 'CR' 'FL' 'MAGENTA' '_RED' 'WA'
'BEEP' 'CS' 'FONT' '_MAGENTA' 'RL' 'WC'
'BG' 'CURSOR' 'FRAME' 'MAXSIZE' 'RM' 'WD'
'BI' 'CYAN' '_CYAN' 'GD' 'MINSIZE' 'RP' 'WG'
'BJ' '+D' & '-D' 'GE' 'ME' 'RS' 'WHITE'
'BK' 'DC' 'GF' 'MESSAGE' 'RT' '_WHITE'
'BLACK' 'DEFAULT' 'GOTO' 'MINSIZE' '+S' & '-S' 'WINDOW'
'_BLACK' 'DF' 'GREEN' 'MN' 'Sn' 'WM'
'BLUE' 'DIALOGUE' '_GREEN' 'MODE' 'SB' 'WP'
'_BLUE' 'DN' 'GS' 'MOVE' 'SCROLL' 'WR'
'BM' 'DO' '*H' 'MP' 'SE' & 'SD' 'WRAP'
'BO' 'DROP' 'HIDE' 'MS' 'SF' 'WS'
'BOX' '+E' & '-E' '*I' '+N' & '-N' 'SHOW' / 'HIDE' 'WX'
'BR' 'EB' '+I' & '-I' 'NI' 'SIZE' '*X'
'BS' 'EE' 'IC' '*O' 'SL' '+X' & '-X'
'BT' 'EF' 'IMAGE' 'OFFSET' 'SN' 'XP'
'BU' 'EG' 'JC' 'OPTION' 'SP' 'YELLOW'
'BW' 'EI' 'JD' '+P' & '-P' 'SR' '_YELLOW'
'BX' 'EJ' 'JL' 'PE' 'SWAP' '+Z' & '-Z'
'*C' 'EL' 'JN' 'PEN' 'SX' 'ZX'
Overview
Overview
ProvideX mnemonics deliver special control sequences to a display device or printer.
Discussions on the creation, format, and use of mnemonics begin on the following page. For
groupings see Mnemonic Categories, p.577. For detailed descriptions, refer to the
alphabetically-arranged List of Mnemonics on p. 581.
Using Mnemonics
Mnemonics are generally inserted within a PRINT (or INPUT) statement to invoke
such functions as clearing the screen, positioning the cursor, changing the colour of
characters, setting/resetting various attributes, or enabling/disabling I/O modes.
All mnemonics are enclosed within single quotes. Some require arguments (e.g.,
PRINT 'CIRCLE'(720,600,100,1)). Some are represented by more than one
keyword: a long form or short form (e.g., use either the 'PUSH' or 'WC' to copy the
current window).
Note: Mnemonics are specific to the channel on which they are defined and are only valid
while the channel remains open. When the channel is closed, the mnemonics are cleared.
Use the MNEMONIC directive to define/redefine 2-character mnemonics for any file
or device. For example, to assign settings for the ProvideX mnemonics 'CP' and 'SP':
MNEMONIC(0)'CP'="Courier New,-8":120,40
MNEMONIC(0)'SP'="*":80,25
All 2-character mnemonics listed in this reference that are used for character display
can also be used for character printing. This is provided that the mnemonic is
defined for the printer output channel using the correct escape sequence for the
device specified.
Many motion/editing operations will be emulated when they are not actually
supported by the device specified. However, it is still better to define mnemonics
using the correct motion/editing sequences that are available for the specific device.
Emulation of some sequences may result in slower performance.
For further details on mnemonic definitions, refer to the MNEMONIC Directive, p.210,
and the [WDX] Tag, p.795.
X,Y Coordinates
X,YCo rdinates
When using GUI mnemonics, the values for x, y, and radius are considered logical
screen coordinates not line/column coordinates. In ProvideX, these are known as
graphical units (similar to pixels). Use @X( ) / @Y( ) functions, to convert
line/column values to graphical units ; e.g.,
When you send output to the screen, ProvideX remembers all graphic mnemonics
until a 'CS' Clear Screen, p.594, is performed or the window is destroyed. This
enables Windows to repaint the window properly when required.
ProvideX has three Windows API frame styles available to it. The mnemonic
'WINDOW' or 'WA' Mnemonics, p.643 uses WS_BORDER frame style, which is not
popular with everyone. However, it has advantages: it maintains a global menu and
buttons and is always relative to the main window. The mnemonic 'DIALOGUE'
Mnemonic, p.596, on the other hand, uses WS_DLGFRAME, which is more popular,
but requires absolute screen position and doesn't allow global menus and buttons.
To change the look of the window frame without losing 'WINDOW' functionality,
you can use the WS_THICKFRAME style. To do this, add OPT="Z" to the 'WINDOW'
mnemonic:
PRINT 'WINDOW'(10,10,40,10,"Title",OPT="Z")
Mnemonic Categories
Categories
Mnemonics can be classified according to how they are used, and on the type of device
they control. While there are exceptions where mnemonics can be redefined for use
outside of their intended purpose, the following categories were created to help you
identify the standard mnemonics by their functionality as well as their names:
Definition Behaviour Editing
GUI Display Graphical Printer Graphical Display/Printer
Character Display Character Printer Character Display/Printer
Motion
Definition
Each of the following mnemonics contain a definition or provide information to be
used by a device for performing specific operations:
Behaviour
The following mnemonics are used to modify the behaviour of ProvideX specific to
the channel on which they are defined:
'+E' & '-E' Multi-line Enter as Tab 'EL' Start Edit Key Load
'+F' & '-F' Signal Change of Focus 'EM' End Output Markup Mode
'+I' & '-I' Implied Decimals 'EO' End Output Transparency
'+N' & '-N' Drop Box Write Error 'ET' End Type Ahead
'+T' & '-T' Text Display On/Off 'EW' End WrapAround
'+U' & '-U' Screen Refresh 'FL' Start Function Key Load
'+V' & '-V' Row Highlighting 'IC' Insert a Space at Cursor
'+W' & '-W' Windows-Style 'LC' Mixed-Case User Input
'BEEP' Simple Sound Effect 'ME' Begin Edit Mode
'BG' Begin Generating Error #29 'MN' End Edit Mode
'BI' Begin Input Transparency 'OPTION' On-The-Fly Setting
'BM' Begin Markup 'RM' Reset to Default Mode
'BO' Begin Output Transparency 'SN' Native Screen Mode
'BT' Begin Type-Ahead Mode 'SX' Set Extended Screen Mode
'BW' Begin WrapAround 'WC' Save/Copy Current Window
'EG' End Generating Error #29 'WRAP' WrapAround On/Off
'EI' End Input Transparency 'ZX' Return Attributes as per BBx
Editing
The following mnemonics are used to control various editing operations in both
character-based and GUI display environments:
'BE' Begin Echoing 'LI' Insert Line
'BI' Begin Input Transparency 'ME' Begin Edit Mode
'BT' Begin Type-Ahead Mode 'MN' End Edit Mode
'BW' Begin WrapAround NI' Next Input Numeric
'CE' Clear from Cursor to End of Screen 'RB' Ring Bell
'CF' Clear Foreground Mode 'RC' Return Cursor Address
'CI' Clear Input Type-Ahead Buffer 'RL' Return Line Contents
'CL' Clear from Cursor to End of Line 'RP' Terminal Read to End
'CS' Clear Screen 'RS' Restore Screen
'DC' Delete Character at Cursor 'SCROLL' Define/Control Scroll Region
'EE' End Echo Mode 'SE' & 'SD' Scroll Enable/Disable
'EI' End Input Transparency 'TR' Terminal Read from Start
'EL' Start Edit Key Load 'TW' Transmit Windows as String
'ET' End Type Ahead 'UC' Convert Input UpperCase
'EW' End WrapAround 'WRAP' WrapAround On/Off
'FL' Start Function Key Load
Graphical Display/Printer
The following mnemonics are used all types of graphical output — they can be sent
to a graphical print spooling system (i.e., *WINPRT*), or as output to a screen:
'ARC' Define/Draw Arc 'JD' Justify Decimal-Aligned
'Bn' Background Colour 'JL' Left-Justify Text
'BACKGR' or 'BK' Next Colour Is Background 'JN' Right-Justify Numeric
'BLACK' & '_BLACK' Colour Text 'JR' Right-Justify Text
'BLUE' & '_BLUE' Colour Text 'JS' Left-Justify String
'BU' Begin Underscoring 'LINE' Define / Draw a Line
'CIRCLE' Define / Draw a Circle 'LM' 'Landscape Mode
'CP' Condense Print for Screen 'LF' Line Feed (Advance Line)
'COLOUR' & '_COLOUR' User-Defined Colours 'MAGENTA' & '_MAGENTA' Colour Text
'CYAN' & '_CYAN' 'Colour Text 'MS' Mode Serial
'DEFAULT' or 'DF' 'Define Default 'PEN' Define Pen Style
'EP' Start Expanded Print 'PICTURE' Define / Draw Picture
'EU' End Underscoring 'PIE' Define / Draw Pie Slice
'FILL' Define Fill Style 'PM' 'Portrait Mode
'Fn' Foreground Colour 'POLYGON' Draw Polygon
'FONT' Define / List Fonts 'RECTANGLE' Draw a Rectangle
'GREEN' & '_GREEN' Colour Text 'RED' & '_RED' Colour Text
'GE' End Graphics Data 'SP' Standard Print
'GS' 'Start Graphics Transmission 'TEXT' Draw Text
'IMAGE' Define a Graphics Group 'WHITE' & '_WHITE' Color Text
'JC' Justify Centre 'YELLOW' & '_YELLOW' Colour Text
For more graphical mnemonics, see GUI Display and Graphical Printer, p.579.
Note: In Windows, the 'FILL', 'FONT', 'PEN', and 'PICTURE' mnemonics use Graphical
Device Interface (GDI) resources/handles that are only released when the window
they are in is dropped or cleared, or their 'IMAGE' group is deleted.
Graphical Printer
The following mnemonics are used only when sent to a graphical printer spooling
system (i.e., *WINPRT*):
'+S' & '-S' Substitute Solid Lines On/Off 'L8' Set to 8 LPI
'AB' Abort (For Windows Spooler) 'LPI' Logical Lines / Inch
'CPI' Logical Characters per Inch 'OFFSET' Offset for *WINPRT*
'L6' Set to 6 LPI
For more graphical mnemonics, see Graphical Display/Printer, p.578.
GUI Display
The following mnemonics are used only for graphical user interfaces:
'+E' & '-E' Multi-line Enter as Tab 'GF' Default Window Font
'+F' & '-F' 'Signal Change of Focus 'GOTO' Make Window Current
'+I' & '-I' Implied Decimals 'GREEN' Colour Text
'+N' & '-N' 'Drop Box Write Error 'HIDE' Hide Window Display
'+P' & '-P' Mouse Movements 'MAXSIZE'Window Resize Limit
'+T' & '-T' Text Display On/Off 'MESSAGE' Message Line Text
'+U' & '-U' Screen Refresh 'MINSIZE' Window Resize Limit
'+V' & '-V' 'Row Highlighting 'MOVE' Move Current Window
'+W' & '-W' Windows-Style 'POP' Restore Previous Window
'+X' & '-X' Windows ’X’ Close Button 'PUSH' Save/Copy Window
'+Z' & '-Z' Text-to-Windows Look 'SCROLL' Define Scroll Region
'2D' 'Use 2D Controls 'SE' & 'SD' Scroll Enable/Disable
'3D' Use 3D Controls 'SHOW' Show Window Display
'4D' Use 4D Controls 'SIZE' Visual Size of Window
'BOX' Define / Draw a Box 'SR' Scroll Reset
'BR' Begin Reverse Video 'SWAP' Swap Windows on Stack
'BX' Define / Draw a Box 'TEXTWDW' Text Window
'CAPTION' Replace Caption 'WA' Define / Draw Window
'Cn' Control Cursor Display 'WC' Save/Copy Current Window
'CURSOR' Cursor/Mouse Pointer 'WG' Make Window Current
'DIALOGUE' Define Dialogue 'WINDOW' Define / Draw Window
'DO' Delete Objects in Scroll Region 'WR' 'Remove Current Window
'DROP' Drop Identified Window 'WS' Swap Windows On Stack
'ER' End Reverse Video
'FRAME' Define / Draw a Frame
For more graphical mnemonics, see Graphical Display/Printer, p.578.
Character Printer
The following mnemonics are used only when sent to direct-to-output devices:
'EF' End Expanded Print 'PS' Enable Attached Printer Port
'EL' Start Edit Key Load 'Sn' Slew to Channel #
'EP' Start Expanded Print 'SL' Start VFU Load
'L6' Set to 6 LPI 'VT' Slew to S6, Vertical Tab
'L8' Set to 8 LPI 'WP' Wide Printer (DOS)
'PE' Disable Attached Printer Port
Character Display
The following mnemonics are used only when sent to text-based CUI devices:
'Bn' Background Colour 'MODE' Set Attributes/Colour
'BACKGR' or 'BK' Next Colour Is Background 'MOVE' Move Current Window
'BB' Begin Blinking (DOS) 'POP' Restore Previous Window
'BJ' Join Box Intersections 'PUSH' Save/Copy Window
'BLACK' & '_BLACK' Colour Text 'RED' & '_RED' Colour Text
'BLUE' & '_BLUE' Colour Text 'RS' Restore Screen
'BOX' Define / Draw a Box 'SB' Set Mode to Background
'BX' Define / Draw a Box 'SCROLL' Define Scroll Region
'CAPTION' Replace Caption 'SE' & 'SD' Scroll Enable/Disable
'Cn' Control Cursor Display 'SF' Set Mode to Foreground
'COLOUR' & '_COLOUR' User-Defined Colours 'SR' Scroll Reset
'CURSOR' Cursor/Mouse Pointer 'SWAP' Swap Windows on Stack
'CYAN' & '_CYAN' Colour Text 'TEXTWDW' Text Window
'DEFAULT' or 'DF' Define Default 'WA' Define / Draw Window
'DROP' Drop Identified Window 'WC' Save/Copy Current Window
'EB' End Blinking Mode (DOS) 'WD' Drop Identified Window
'EJ' End Box Joining 'WG' Make Window Current
'EP' Start Expanded Print 'WHITE' & '_WHITE' Color Text
'Fn' Foreground Colour 'WINDOW' Define / Draw Window
'GE' End Graphics Data 'WM' Relocate Current Window
'GOTO' Make Window Current 'WR' Remove Current Window
'GS' Start Graphics Transmission 'WS' Swap Windows On Stack
'GREEN' & '_GREEN' Colour Text 'XP' Line Mode (DOS)
'MAGENTA' & '_MAGENTA' Colour Text 'YELLOW' & '_YELLOW' Colour Text
Character Display/Printer
The following mnemonics are usable on both direct-to-output and text-based CUI
devices:
'BR' Begin Reverse Video 'ES' 'Send Escape
'BU' Begin Underscoring 'FF' FormFeed
'CP' Condense Print for Screen 'LF' Line Feed (Advance Line)
'ER' End Reverse Video 'MS' Mode Serial
'EU' End Underscoring 'SP' Standard Print
Motion
The following mnemonics are used to direct cursor movement in both text-based
and GUI display environments:
'BS' Cursor Back One Space 'DN' Move Cursor Down a Line
'CH' Position Cursor at Home 'LT' Move Left One Column
'CR' 'Carriage Return 'RT' Move Right One Column
'CS' Clear Screen 'UP' Move Up One Line
List of Mnemonics
ListofMnemonics
The ProvideX mnemonics listed below are in ASCII sort order, except where the
mnemonic keyword has an initial asterisk, plus sign, minus sign or underscore.
These are listed under their second character; e.g., you'll find '_BLUE' under "B" with
'BLUE' and '+S' / '-S' under "S".
Definition
Format '@@'=esc_seq$
Where:
esc_seq$ ESC+"[ and a string expression defining the cursor position
coordinates, using the format:
\id_char{modifier | ;}format_code
For example, '@@'=ESC+"[\LA;\CAH".
GUI Display
Description Display two-dimensional controls (older Windows visual style ) for all
current/subsequent windows (deactivates '3D' or '4D' controls).
GUI Display
Description Display three-dimensional controls (Windows 95 visual style) for all current/subsequent
windows. To deactivate, use PRINT '2D'.
GUI Display
Description Display Windows Vista (or XP) visual style for all current/subsequent windows.
Vista style appears only when run under Vista. On other Windows systems, this
mnemonic renders an XP visual style. To deactivate, use PRINT '2D'.
Graphical Printer
Description For Windows Spooler Only. Use 'AB' to abort output to the Windows print spooler.
See also Printing in MS Windows, p.221 in the User’s Guide.
Graphical Display/Printer
Format 'ARC'(x,y,radius,aspect,angle_1,angle_2)
Where:
angle_1 Starting angle, in degrees. Numeric expression.
angle_2 Ending angle, in degrees. Numeric expression.
aspect Aspect ratio / viewpoint. (Ratio=1 results in no tilt.) Numeric
expression.
radius Radius of the circle, in graphical units. Numeric expression.
x,y Coordinates for the centre of the drawing, in graphical units. Numeric expression.
Description Use 'ARC' to draw (print) an arc on the device. Use graphical units or @X(col) and
@Y(line) functions for x, y, and radius. The arc will extend from the starting angle1
to angle2. The 'ARC' mnemonic uses the current 'PEN' attributes.
Example The example below draws two different-coloured arcs. Aspect ratio=3 tilts the
resulting drawing into an elliptical "shape". (Since this ellipsis is really two arcs as
opposed to an enclosed shape, 'FILL' attributes do not apply.) Aspect ratio=1 would
join the arcs in a circular shape instead.
0060 PRINT 'PEN'(1,3,1)
0070 PRINT 'ARC'(800,250,75,3,1,75)
0080 PRINT 'PEN'(
0090 PRINT 'ARC'(800,250,75,3,75,1)
Definition
Description Use 'AT' to define a character attribute output sequence.
For additional information regarding the use of special mnemonics (i.e., '@@', '*C', '*I',
'*O', '*R', '*X', 'AT', 'GD', 'WX') when creating a device driver, see Dynamic Information
in Mnemonics, p.576 or Device Drivers, p.390 in the User’s Guide.
Description Setting this option enables file output to be buffered or not buffered (physically flushed)
after each PRINT or WRITE operation. The primary use of this option is for Log type files.
Description Use the format above to begin outputting a background colour to a device (i.e.,
PRINT, INPUT, etc). The 16 colour codes are in ASCII sequence from 0 to ?.
Use the same colour codes for 'Fn' Foreground Colour, p.603.
Example In this example, the prompt and user's response will both be in white text on a blue
background.
0010 INPUT 'B4','WHITE',"Please enter your name: ",NAME$,
Description Use either 'BACKGR' or 'BK' to designate that the next colour mnemonic (e.g., 'BLUE')
is the background colour for the text region when a directive sends output to the
display device (i.e., PRINT, INPUT, etc.).
Character Display
Description Included for completeness only. Use 'BB' to begin blinking of characters (legacy DOS
systems). To end blinking mode, use the 'EB' Mnemonic, p.599.
Editing
Description Use 'BE' to begin echoing characters entered from the keyboard in response to an
INPUT (or READ, FIND, ...) directive. Echoing is ON by default for channel 0 (zero, the
main terminal). For other channels, echoing is OFF by default. To end echoing, use
the 'EE' Mnemonic, p.599.
Behaviour
Description The 'BEEP' mnemonic allows applications to play sounds in a simpler manner than
the MULTI_MEDIA command. This mnemonic accepts a string that contains the same
keywords as the MSGBOX directive relative to the system sounds of "STOP",
"QUESTION", "INFO", "EXCLAMATION", "?" and "!"; e.g.,
PRINT 'BEEP'("STOP")
PRINT 'BEEP'("*STOP,w")
The ,w option causes ProvideX to wait until the sound has completed before
continuing any processing. In order for ,w to work, the sound needs to be
registered. Use an asterisk * before the sound name to have the system look up the
sound in the Windows registry (which is not the same as sound names in the control
panel); e.g.,
PRINT 'BEEP'("*MailBeep") ! Registered Sound Event
PRINT 'BEEP'("*C:\Windows\Media\tada.wav") ! Specific File
PRINT 'BEEP'("*Windows XP Logoff Sound") ! Found by automatic search
In the last example, the real filename is C:\Windows\Media\Windows XP
Logoff Sound.wav. If the name given does not match a registered sound, then
the Windows OS searches its list of possible sound locations (current directory,
Windows directory, System directory, etc.). For more details, consult the Microsoft
documentation on Registering Sound Events or check the registry for
HKEY_CURRENT_USER\AppEvents\EventLabels\*
Behaviour
Description Use 'BG' to begin generating Error #29: Invalid Mnemonic or position
specification whenever an invalid mnemonic is executed. To end generation of
Error #29, use the 'EG' Mnemonic, p.599.
Editing or Behaviour
Description Use 'BI' to begin input transparency mode. (All input is accepted without any system
interpretation of control codes. With 'BI' activated, a SIZ= option on an INPUT
directive is the only way you can specify a terminator / end of input. To end input
transparency mode, use the 'EI' Mnemonic, p.600.
Example When you need to return input one character at a time, we recommend that you use
the 'ME' Mnemonic, p.616. However, it is also possible to use 'BI' in combination
with SIZ=1 to return input one character at a time. Then, each character is returned
as entered. Standard characters are returned in the variable specified (e.g., CHAR$,
below). Function and edit keys are returned in the system variable CTL. Your
program will still be responsible for processing all the edit keys.
0010 INPUT (0,SIZ=1) 'BI', CHAR$, 'EI' ! This will echo the data
0010 OBTAIN (0,SIZ=1) 'BI', CHAR$, 'EI' ! This will not echo
Character Display
Description Use 'BJ' to tell ProvideX to begin joining box intersections. After you use this
mnemonic, all 'BOX' edge lines which intersect existing graphic line characters will
be adjusted to join the intersecting lines properly. To end box joining, use the 'EJ'
Mnemonic, p.600.
Description All input or output following this mnemonic will be in black foreground or
background.
Description All input or output following this mnemonic will be in blue foreground or
background.
Behaviour
Description Use 'BM' to begin output of markup files containing embedded mnemonics. For
instance, in the ProvideX *VIEWER*, 'BM' sends all data directly to the print file without
interpretation in tokenized format (except for 'FF' , 'CR', and 'LF' mnemonics, which are
output as 0C, 0D, and 0A respectively). This allows you to send print jobs to any
Windows printer. To end markup, use the 'EM' Mnemonic, p.601.
Behaviour
Description Use 'BO' to begin output transparency mode. (All printed output is sent directly to
the display device without checking for embedded mnemonics; i.e., $1B$ (Esc)
followed by the mnemonic code.) Use 'EO' to end output transparency mode.
Description You can use either 'BOX' or 'BX' in the format to draw a text mode box. If you include
a title, it is displayed left-justified on the top line of the box unless the 'AH' system
parameter is set. If you include attributes, these are sent to the display device before
the box is displayed. Refer to the 'AH' System Parameter, p.652.
Example The boxes in the example are drawn joined with titles. Current 'FILL' and 'PEN'
settings are ignored when you use 'BOX':
0010 PRINT 'CS'; LIST
0020 PRINT 'PEN'(2,3,6),'FILL'(3,8)
0030 PRINT 'BOX'(4,6,16,10,"Box 1",'BJ')
0040 PRINT 'BX'(19,6,10,10,"Box 2")
0050 PRINT 'EJ'
Motion
Description Use 'BS' to move the cursor back one position to the left. ProvideX ignores this
mnemonic if the cursor is in column 0 zero.
Behaviour or Editing
Description Use 'BT' to begin type-ahead mode. This mode lets the user enter input before the
execution of an INPUT statement. ProvideX supplies an internal buffer for the
characters entered. To end type-ahead mode, use 'ET' End Type Ahead, p.602.
(See also: 'CI' Clear Input Type-Ahead Buffer, p.591.)
Behaviour or Editing
Description Begin WrapAround. (See 'EW' or 'WRAP' WrapAround On/Off, p.644.).
Definition
Format MNEMONIC (chan)'*C'=data$
Description '*C' (star-c) contains a string expression that will be automatically printed to the device
driver when a CLOSE is executed.
Note: For *WINPRT* devices, because the Windows spooler automatically resets the
printer when closed, the '*C' mnemonic is ignored.
For additional information regarding the use of special mnemonics (i.e., '@@', '*C', '*I',
'*O', '*R', '*X', 'AT', 'GD', 'WX') when creating a device driver, see Dynamic Information
in Mnemonics, p.576 or Device Drivers, p.390 in the User’s Guide.
Description Use the format above ('C0', 'C1', or 'C2') to control how the cursor is displayed.
GUI Display
Format 'CAPTION'(text)
Where:
text Replacement caption. String expression.
Description Use 'CAPTION'(text) to change the caption for the current window. If the current
window does not have a caption and is located at position 0.0, ProvideX replaces the
caption on the main window. ('WINDOW' or 'DIALOGUE')
To find out the caption for the current window you can use a MULTI_LINE READ
directive with CTL=0, as in MULTI_LINE READ 0,A$.
Editing
Description Use 'CE' to clear the screen from the cursor position to the end of the screen.
Editing
Description Use 'CF' to clear non-protected mode for characters on the screen. (See also: 'SF' Set
Mode to Foreground, p.635.)
Motion
Description Use 'CF' to position the cursor to the device’s home location; i.e., @(0,0). The screen
is not cleared.
Editing
Description Use 'CI' to clear any input from the type-ahead buffer. (See also 'BT' Begin
Type-Ahead Mode, p.589.)
Graphical Display/Printer
Format 'CIRCLE'(x,y,radius,aspect)
Where:
aspect Numeric aspect ratio / viewpoint. (Ratio=1 results in no tilt.)
radius Radius of the circle, in graphical units. Numeric expression.
x,y Coordinates for the centre of the drawing, in graphical units.
Numeric expression.
Description Use 'CIRCLE' to draw (print) a circle on the device. For x, y, and radius, use graphical
units or the @X( ) / @Y( ) Functions, p.387. The 'CIRCLE' mnemonic uses the current
attributes for 'FILL' Define Fill Style, p.603, and 'PEN' Define Pen Style, p.626.
Editing
Description Use 'CL' to clear the current line from the cursor position to the end of the line.
Description All input or output following this mnemonic will be set to the defined foreground or
background colour. For further information, refer to the description for changing the
colour index provided under the 'OPTION' Mnemonic, p.623.
Example 10 open(1)"LP"
20 print (1)"NORMAL"+'CP'+"COMPRESSED"+'SP'+"NORMAL"
30 close(1)
If the example above is run in ProvideX, the word COMPRESSED would be in condensed
print, and NORMAL would be in standard print. (In other Business Basics, the font for the
complete line is affected and, for this example, would be in standard print.)
Graphical Printer
Format 'CPI'(chars)
Where:
chars Logical characters per inch. Numeric expression.
Description Use 'CPI'(chars) to set the logical CPI (characters per inch) for printing in graphics
mode, where (as a rough guide to equivalent sizes):
Point size -12 = 6 LPI, 10 CPI
Point size -10 = 7.2 LPI, 12 CPI
Point size - 7 = 10 LPI, 16 CPI
For more information refer to 'LPI' Logical Lines / Inch, p.614, and the TXH( )
Function, p.540, and the TXW( ) Function, p.541.
Motion
Description Use 'CR' to return to column 0 (i.e., Carriage Return without line feed).
Editing or Motion
Description Use 'CS' to clear the screen and set the cursor position @(0,0).
As alternatives, you can use the 'CH' (Cursor Home without clear screen) and 'FF'
(FormFeed, alternative to clear screen for print data) mnemonics.
Description Use the above formats to control cursor and mouse pointer displays.
Note: The mouse pointer selected via the 'CURSOR' mnemonic may be overridden by
settings in the INI file.
Description All input or output following this mnemonic will be in cyan foreground or
background.
Example INPUT '_CYAN','WHITE',"Please enter your name: ",Name$,
Editing
Description Use 'DC' to delete the character at the current cursor position. (Text shifts one
position to the left for all characters to the right of the cursor on the same line.).
Description Use either 'DEFAULT' or 'DF' to define the current attributes/font as the default for an
OPEN channel. For instance, you can set a default for fixed font, reverse video,
blinking, underscore, foreground / background, etc. To set the default font for all
graphical objects, refer to the 'GF' Mnemonic, p.608.
Example To set a font in *WINPRT* printing as the standard default font for an OPEN channel:
0010 OPEN (30)"*WINPRT*;ASIS"
0020 PRINT (30)'FONT'("Courier New",-7),'DF'
GUI Display
Format 'DIALOGUE' (col,ln,wth,ht[,wdw_id],[title$][,attrib$][,OPT=string$])
Where:
col,ln, Position / coordinates. Numeric expressions. Column and line
wth,ht coordinates for top left corner, width in number of columns and height in
number of lines.
attrib$ Optional attribute string. If you include attributes, use one or more
mnemonics to define the defaults for the window. String expression.
title$ Optional title. String expression.
string$ Optional attributes. Supported options include:
& Ampersand - creates window that logically attaches to the current
window (i.e., leaves the current window active and shares controls)
* Asterisk - creates resizable window with automatic scrollbars for text
plane; e.g., PRINT 'DIALOGUE'(1,1,60,20,"Title",OPT="*")
- Dash - window has a minimize button.
? Window supports Win95 Help button.
^ Caret - window is always on top (not applicable to the 'WINDOW'
mnemonic); e.g., PRINT 'DIALOGUE'(1,2,30,3,"My Top
Dog",OPT="^").
c New window is a child of the window that launched it.
C Disables X close button on title bar of window and eliminates the
system control menu from the title bar.
F Window can be maximized, occupying full screen (regardless of
number of columns/rows). Area outside the defined text region will
be cleared to the default background colour for the window.
Description Use 'DIALOGUE' to define a new window which is not contained in the main
ProvideX screen. In a non-Windows environment, this does the same as a 'WINDOW'
mnemonic.
Note: The ‘DIALOGUE' mnemonic with OPT="^" can be useful for error message
windows. Although the users can still perform other operations, the error message
will remain “always on top” as a constant reminder to deal with the error.
ProvideX uses the WS_DLGFRAME frame style from the Windows API for the 'DIALOGUE'
mnemonic. For more information, see Windows API Frame Styles, p.575.
See also: 'TEXTWDW' Create Text Window, p.639 and WINDOW' Define / Draw
Window, p.643.
Example The example below creates a dynamic, resizable/scrollable viewer using a
‘DIALOGUE' window which is large enough to display the complete picture. A 'SIZE'
mnemonic fits the window to the screen. The user is supplied with scroll bars to
view the desired image.
0010 CALL "*picture;Get_size","c:\windows\clouds.bmp",WD,HI
0020 LET WD=INT(WD),HI=INT(HI)
0030 PRINT 'DIALOGUE'(10,10,WD,HI,"MY Photo",OPT="*-m"),
0030: 'SIZE'(30,10),'B?','SR','CS',
(ProvideX normally redraws the text plane below the picture. Line 0040 suppresses
the text plane to avoid flicker.)
0040 PRINT '-T',
0050 PRINT 'PICTURE'(0,0,@X(WD),@Y(HI),"C:\windows\clouds.bmp"),
0060 OBTAIN 'C0',*; IF CTL<>4 THEN GOTO *SAME
Motion
Description Use 'DN' to move the cursor down a line.
GUI Display
Description Use 'DO' to delete all objects that start (top left corner) in the current scroll region.
Description Use either 'DROP' or 'WD' in the format to drop the identified window. If this
window does not exist or is the only window, ProvideX returns an Error #57: No
such window defined. If wdw_id=-1, all windows except the primary window
are dropped.
Example 30400 LET WW_ADD=HWN(0)
30410 PRINT %W_MSG$,'WINDOW'(20,8,40,8,WW_ADD,"Deleting Sku"
30410:),'CS','SB',
30420 LET DEL_SKU$=FROM_SKU$,SAVE_KEY$=COMP$+FORM$
30430 !
30440 LET ADD_SKU$=TO_SKU$
30460 GOSUB DELETE_ITEM
30470 READ (E855FENT_H,KEY=SAVE_KEY$)IOL=0310
30480 PRINT 'WG'(W_ADD),'WD'(WW_ADD),%NORM_SCR$,
Description Use '+E' and '-E' to control the use of the Enter key as Tab in multi-lines.
Character Display
Description Included for completeness only. Use 'EB' to end blinking of characters (legacy DOS
systems). This is the opposite of the 'BB' Mnemonic, p.584.
Editing
Description Use 'EE' to end echoing of characters sent to the display device. This is the opposite
of the 'BE' Mnemonic, p.585.
Behaviour
Description Use 'EG' to stop generation of Error #29: Invalid Mnemonic or position
specification whenever an invalid mnemonic is executed. This is the opposite
of the 'BG' Mnemonic, p.585.
Editing or Behaviour
Description Default. Use 'EI' to end input transparency mode. This is the opposite of the 'BI'
Mnemonic, p.586.
Character Display
Description Default. Use 'EJ' to end automatic joining of box intersections for 'BOX' mnemonic
drawings. This is the opposite of the 'BJ' Mnemonic, p.586.
Editing or Behaviour
Description Use 'EL' to start loading edit keys. This feature is included for compatibility with
other languages. For more information on conversion and compatibility modes, see
the Installation Guide. Also, refer to the DEFCTL Directive, p.78.
ProvideX Utilities:
ProvideX utilities do not expect function and editing keys to be loaded with other
values from the use of 'FL' or 'EL'. Issue a PRINT 'FL',"1",'EL',"1" to reset
loaded function or editing keys just prior to running any of the ProvideX utilities.
See also: 'FL' Start Function Key Load, p.604.
Character Printer
Description Use 'EL' to end VFU load.The data following 'SL' (from 'SL' up to an 'EL') defines the
VFU channels. The total number of characters defines the page length, the characters
themselves represent the channels that can be slewed to. The first character must be
a 1 (channel 1). See 'SL' Start VFU Load, p.636, 'Sn' Slew to Channel, p.633, and
'VT' Slew to S6, Vertical Tab, p.641.
Behaviour
Description Use 'EM' to end output of markup files containing embedded mnemonics. This is the
opposite of the 'BM' Mnemonic, p.587.
Behaviour
Description Use 'EO' to end output transparency mode. This is the opposite of the 'BO'
Mnemonic, p.587. If you want to send Esc ‘EO' as a mnemonic, you must use it as a
stand-alone mnemonic; e.g., PRINT 'BO',X$,'EO'.
To send Esc ‘EO' as part of your data, embed it in an expression (e.g., PRINT
'BO'+X$+'EO') instead of using it as a stand-alone. Then, ProvideX evaluates 'EO'
as an embedded Esc ‘EO' and sends it without interpretation to the device / printer.
Character Display/Printer
Description Use the 'ES' mnemonic to send a $1B$ escape code to a text mode device.
Editing or Behaviour
Description Use 'ET' to end type-ahead mode. This is the opposite of the 'BT' Mnemonic, p.589.
Behaviour or Editing
Description Use 'EW' to end WrapAround. (See 'BW' or 'WRAP' WrapAround On/Off, p.644.)
Description Use '+F' & '-F' to control whether or not ProvideX signals a change of Focus. If you use
'+F', ProvideX signals a change of Focus by issuing a CTL=1000.
Description Use the format above to begin outputting a foreground colour to a device (i.e.,
PRINT, INPUT, etc). The 16 colour codes are in ASCII sequence from 0 to ?.
Use the same colour codes for 'Bn' Background Colour, p.584.
Example In this example, the prompt and user's response will be in white text on a blue
background.
0010 INPUT 'B4','F7',"Please enter your name: ",NAME$,
Graphical Display/Printer
Format 1. One-Colour Fill Pattern: FILL' (pattern,colour1)
2. Two-Colour Fill Pattern/Gradient: 'FILL' (pattern,colour1,colour2)
Where:
pattern Numeric code for fill pattern type. Supported options include:
0 - No fill 4 - Crossed line
1 - Solid fill 5 - Bottom left to top right
2 - Horizontal lines 6 - Top left to bottom right
3 - Vertical lines 7 - Diagonal crossed lines
Description Use 'FILL' to define the current fill pattern/gradient and colours for an open channel
(default is the terminal). The direction for gradient fill is derived from the pattern
codes 2, 3, 5, and 6. Non-gradient two-colour fill patterns: 4 and 7 (first colour for lines,
second colour for background fill).
Editing or Behaviour
Description Use 'FL' to start loading Function keys. This feature is included for compatibility
with other languages. For more information on conversion and compatibility modes,
see the Installation Guide. Also, refer to the DEFCTL Directive, p.78.
ProvideX Utilities:
ProvideX utilities do not expect function and editing keys to be loaded with other
values from the use of 'FL' or 'EL'. Issue a PRINT 'FL',"1",'EL',"1" to reset
loaded function or editing keys just prior to running any of the ProvideX utilities.
See also: 'EL' Start Edit Key Load, p.600.
Graphical Display/Printer
Formats 1. Define Font (with specification): 'FONT'(name$,size[,attrib$[,angle]])
2. Define Font (via special names): 'FONT'({"*SYSFONT" |"*GUIFONT"})
3. List Channel's Fonts: 'FONT'(LIST*[,chan])
4. List Fonts, Properties: 'FONT'(LIST PROPERTIES FOR [name$][,chan])
5. List Sizes for a Font: 'FONT'(LIST name$[,chan])
Where:
angle Slant for printing, in degrees. Optional.
attrib$ Font attributes. Optional string expression. Valid codes include:
& Underscore the character following the '&' (as in hot keys)
B Bold
C Centre text
F Show focus lines around text
I Italics
N Numeric data alignment
R Right justify text
S Applies background colour to area directly behind text.
U Underscore ("_")
W Word wrap
# Same as N
In addition, you can control the character set.
! Use symbol character set (char. set 2)
O Use OEM character set (char. set 255)
J Use Japanese character set (char. set 128)
D Use character set 1 or current default for the given font.
%nnn Use specific Windows character set nnn.
The default is ANSI, character set 0.
chan Logical file number or channel.
*GUIFONT Keyword representing the dialogue font used by standard MS
Windows applications for dialogues.
name$ Font name. String expression. Font must exist in the system.
size Numeric. Use positive values for font sizes relative to the current
default for the device (.5 for half size, 2 for double, etc.). Use negative
sizes for absolute font size in points. As a rough guide to equivalent
sizes:
Point size -12 = 6 LPI, 10 CPI
Point size -10 = 7.2 LPI, 12 CPI
Point size - 7 = 10 LPI, 16 CPI.
*SYSFONT Keyword representing the default graphical system font - typically
"System,0.66,B".
Description 'FONT' defines the current font and specifications. It can also be used to return
comma-delimited font and property (attribute) lists for the channel (default=the
terminal), or a size list for a specific (existing) font.
Two special font names may be used in place of the specifications: *SYSFONT
(default graphical system font) and *GUIFONT (standard MS Windows dialogue
font). These fonts will change based on OS Version and theme. The new special font
names may be used anywhere a font specification is given.
Example f$="MS Serif"; ? 'FONT'(LIST F$) ! returns sizes for MS Serif font:
13,16,19,21,27,35,10,11,
0100 PRINT 'FONT'("MS Serif",-11)
Note: 'FONT' does not work with direct-to-device printers; i.e., it can be used with
*WINPRT* but not *WINDEV*. See *WINPRT* Windows Printing, p.754.
GUI Display
Format 'FRAME'(x,y,x,y,style,[,title$])
Where:
title$ Frame title. Optional. String expression.
style Determines the style level and bevel sizes in creating the frame.
Numeric expression:
>0 'FRAME' is elevated button with bevel width=style value
<0 'FRAME' is inset with bevel width=style value
=0 'FRAME' appears etched or flat (depends on '2D' , '3D' , or '4D'.
x,y Placement coordinates, top left and bottom right, in graphical
units. Numeric expression.
Description Use 'FRAME' to draw (print) a frame on the screen. Use graphical units or @X(col)
and @Y(line) functions for beginning and ending the frame.
Definition
Description Use the 'GD' mnemonic to define the 11 characters that can be used for text mode
line-drawing operations. The standard line-drawing characters are A-K (and for
compatibility 0-9 and colon) as defined below:
A or 2 Top left corner. G or : Cross hairs.
B or 3 Top right corner. H or 6 Vertical with horizontal right.
C or 4 Bottom left corner. I or 7 Vertical with horizontal left.
D or 5 Bottom right corner. J or 8 Horizontal with vertical up.
E or 0 Horizontal line. K or 9 Horizontal with vertical down.
F or 1 Vertical line.
Each character consists of up to four lines (each line represented by a bit in the byte
defined by 'GD'); i.e.,
$01$ - Horizontal line centered top to bottom in left half of cell.
$02$ - Vertical line centered left-right in top half of cell.
$04$ - Horizontal line centered top to bottom in right half of cell.
$08$ - Vertical line centered left-right in bottom half of cell.
If 'GD' is not defined for the output, then $0C090603050A0F0E0B070D$ is the
default. This conforms to the standard graphical character outputs as defined in the
table above. The mnemonics 'GS' and 'GE' will not (and should not) be defined. If an
output character is not defined by the 'GD' mnemonic, the cross hairs will be used.
For additional information regarding the use of special mnemonics (i.e., '@@', '*C', '*I',
'*O', '*R', '*X', 'AT', 'GD', 'WX') when creating a device driver, see Dynamic Information
in Mnemonics, p.576 or Device Drivers, p.390 in the User’s Guide.
GUI Display
Description Use 'GF' to declare the current font in use as the default graphic font for all objects to
be created in the window.
Description Use either 'GOTO' or 'WG' in the format to make the identified window the current
window and move it the top of the window stack. If this window does not exist or is
the only window, ProvideX returns an Error #57: No such window defined.
Example 30400 LET WW_ADD=HWN(0)
30410 PRINT %W_MSG$,'WINDOW'(20,8,40,8,WW_ADD,"Deleting Sku"
30410:),'CS','SB',
30420 LET DEL_SKU$=FROM_SKU$,SAVE_KEY$=COMP$+FORM$
30430 !
30440 LET ADD_SKU$=TO_SKU$
30460 GOSUB DELETE_ITEM
30470 READ (E855FENT_H,KEY=SAVE_KEY$)IOL=0310
30480 PRINT 'WG'(W_ADD),'WD'(WW_ADD),%NORM_SCR$,
Description All input or output following this mnemonic will be in green foreground or
background.
Definition
Format '*H' =colour_codes$
Where:
colour_codes$ String of 8 characters representing screen colours for program
listings. The following ASCII colour codes are supported:
0 Black* 4 Blue 8 Dark Gray < Dark Blue
1 Red 5 Magenta 9 Dark Red = Dark Magenta
2 Green 6 Cyan : Dark Green > Dark Cyan
3 Yellow 7 White ; Dark Yellow ? Dark Gray
Each colour code position represents different elements:
1: Background colour for highlighting *[...] searches
0 to 7 for standard background colours
8 to ? for bright/foreground colours
R for Reverse Video.
2: Colour for variables.
3: Colour for literals.
4: Colour for remarks.
5: Colour for error lines.
6: Colour for mnemonics.
7: Colour for statement numbers or labels.
8: Colour for operators (e.g., + - ( ) * / ).
For positions 2 to 8 the colour codes are 0 to 7 for standard
foreground colours and 8 to ? for dim / background colours. The
command mode scanning feature uses Highlight=Yellow.
Description Use '*H' (Star-h) to define colours in a displayed listing for the LIST Directive, p.176,
and LST( ) Function, p.473. (See also: 'CS' System Parameter, p.656.) Default settings
are shown in the example below.
GUI Display
Description Same as 'SHOW' / 'HIDE' Control Window Display, p.635.
Definition
Format '*I' =table$
Description '*I' (star-i) is used to create a 256-character terminal input conversion table. As each
character is received from an input device, it is translated into a new character based
on this table, if defined. An incoming character is translated to its numeric value in
an ASCII table (0-255) and this value is used as an offset into the 256-character table
defined by '*I' — the character at that offset will be used for input instead of the
original incoming character.
For additional information regarding the use of special mnemonics (i.e., '@@', '*C', '*I',
'*O', '*R', '*X', 'AT', 'GD', 'WX') when creating a device driver, see Dynamic Information
in Mnemonics, p.576 or Device Drivers, p.390 in the User’s Guide.
Description Use PRINT '+I ' during system startup to activate support for implied decimal points for
all numeric multi-lines. Use PRINT '-I ' to cancel it. (For a single multi-lines use OPT= 'i '
to suppress implied decimal use.)
Editing or Behaviour
Description Use 'IC' to insert a space at the current cursor position and shift all remaining
characters on the line one position to the right.
Graphical Display/Printer
Formats 1. Define Graphics Group: 'IMAGE' (group$)
2. Delete Graphics Group: 'IMAGE'(DELETE group$)
3. Enable/Disable Group: 'IMAGE'({ENABLE | DISABLE} group$)
Where:
group$ Graphics group name. String expression. If you omit this when defining
a group, the default is "" (null).
Description ProvideX normally queues all mnemonics since the last ‘CS' (to supply information
in case Windows needs to redraw the screen). In consequence, if you are constantly
creating graphics, you can exhaust system resources. 'IMAGE' helps to circumvent
this potential problem.
When 'IMAGE' is used to define and control the display of graphics groups, all graphical
mnemonics following the 'IMAGE' mnemonic will be grouped. You can then disable or
hide the group to remove it from view and enable or show the group to make it visible.
The DELETE option can be used to destroy the group and return resources to the system.
Hint: When drawing graphical objects, each object will be laid one on top of the next. Use
the 'IMAGE' mnemonic to erase previous graphics instead — this reduces the consumption
of Windows resources and helps prevent flicker during a repaint operation.
Graphical Display/Printer
Description Use 'JC' to indicate that the following text is to be centre-justified.
Graphical Display/Printer
Description Use 'JD' to indicate that the following data is to be decimal-aligned.
Graphical Display/Printer
Description Use 'JL' to indicate that the following text is to be left-justified.
Graphical Display/Printer
Description Use 'JN' to indicate that the following numeric data is to be right-justified.
Graphical Display/Printer
Description Use 'JR' to indicate that the following text is to be right-justified.
Graphical Display/Printer
Description Use 'JS' to indicate that the following string data is to be left-justified.
Editing or Behaviour
Description Allow upper and lower case (i.e., mixed case) for user input. This is the opposite of
the 'UC' Mnemonic, p.640.
Editing
Description Delete the current line and shift all subsequent lines up one line.
Editing
Description Insert a blank line at the current position and push all subsequent lines down by one.
The bottom line on a full screen will be lost.
Graphical Display/Printer
Format 'LINE'(x,y,x,y[,x,y ...])
Where:
x,y Sets of x,y coordinates in graphical units. Numeric expression.
Description Use 'LINE' to draw (print) a line on the device (e.g., terminal). Use graphical units or
@X(col) and @Y(line) functions for the various coordinates. The 'LINE' mnemonic
draws these lines using the current 'PEN' attributes.
Graphical Display/Printer
Description Use 'LM' to switch to landscape mode when printing to *WINPRT*, p.754. This is the
opposite of the 'PM' Mnemonic, p.629.
Graphical Printer
Format 'LPI'(lines)
Where:
lines Logical lines/rows per inch for graphics mode. Numeric expression.
Description Use 'LPI' to set the logical LPI (lines per inch) value in graphics printing, where (as a
rough guide to equivalent sizes):
Point size -12 = 6 LPI, 10 CPI
Point size -10 = 7.2 LPI, 12 CPI
Point size - 7 = 10 LPI, 16 CPI
Refer to the 'CPI' Logical Characters per Inch, p.593, and the functions TXH( ),
p.540 and TXW( ), p.541.
Motion
Description Use 'LT' to move the cursor one column to the left.
Description All input or output following this mnemonic will be in magenta foreground or
background.
GUI Display
Format User's Maximum Setting: ‘MAXSIZE'(width,height)
User's Minimum Setting: ‘MINSIZE'(width,height)
Where:
width,height Size limits on the user's permission to resize a window. Width in
columns, height in lines. Numeric expression.
Description Use 'MAXSIZE' and 'MINSIZE' to limit the maximum and minimum a window can be
resized by the user when dragging the window’s edge. These mnemonics only affect
the window size that the user can set, not what the program sets as the size. They
have no effect on the 'SIZE' mnemonic.
Note: The values you use for 'MINSIZE' must not exceed the values for 'MAXSIZE'. By
default, 'MINSIZE' is set to 0,0 and 'MAXSIZE' is set to the originally-defined window
size. If you set 'MAXSIZE'(0,0), then the total defined window size is used.
Example In the example below, the user is limited to resizing the scrollable dialogues display
area by reducing it to a minimum of 5 columns by 5 lines or increasing it a maximum
of 40 columns by 15 lines:
0010 PRINT 'DIALOGUE'(1,1,80,25,"Title",'CS',OPT="Z")
0020 PRINT 'SIZE'(30,10),
0030 PRINT 'MINSIZE'(5,5),
0040 PRINT 'MAXSIZE'(40,15),
Editing or Behaviour
Description Use 'ME' to begin Edit Mode. In Edit Mode, any keystroke or negative CTL event not
used by the input (e.g., up / down arrows) will be returned to your program in the CTL
variable instead of being rejected. ProvideX uses built-in edit functions to format and
process all keyboard input, but will terminate input and returns values to your program
when it encounters keystrokes, or negative CTL events the input editor doesn't handle.
To end Edit Mode, use the 'MN' Mnemonic, p.618.
Example 0010 INPUT "Enter Amount:", 'ME', AMNT:"$###,##0", 'MN'
GUI Display
Format 1. Display Text in Message Bar: 'MESSAGE'(text$)
2. Define Segmented Message: 'MESSAGE'(DEF start_1[,start_2[,start_3]])
3. Reset Message Bar: 'MESSAGE'(DEF 0)
4. Display Text in Specific Segment: 'MESSAGE'(text$,segment)
ext$ Text to display. String expression.
start_# Column number where optional additional segments begin. Default
segment 0 starts at column 0. You can have up to 4 segments (0, 1, 2 and
3). Define optional segments 1, 2 and 3 by specifying their starting
column number. Numeric expressions.
segment Segment # for display. Numeric expression. Valid range: 0 to 3.
Description Use 'MESSAGE' to print text on the message bar at the bottom of the ProvideX
window. When you can create optional message bar segments 1, 2 and 3, ProvideX
places the segment separator at the column number you specify in start_# for the
corresponding segment(s). Reset to a single segment (segment 0 at column 0) by
Defining segment 0 zero.
You can send 'MESSAGE' to segment 0 zero and to defined segments by segment
number. By default, if you omit the segment number, your text is displayed in
segment 0 starting at column 0.
Note: If you use a positive column number, the segment's separator is offset that many
columns from the left of the message bar. Use negative values to have the separator's
placement offset from the right instead. If you want to centre text within a segment,
use $09$ ( Tab character) as the first character of the text to print.
Example 0010 print 'message'(def 7,-20) ! create seg1 @(7), seg2 @(20 cols from right)
0020 print 'message'("") ! Null displayed in segment 0
0030 print 'message'("hello",1),'message'("there",2)
0040 print "To reset the message bar PRINT 'message'(def 0)"
Note: The existence/height of the message bar can be controlled by an INI file setting.
Each of the four possible segments of the message bar region has been assigned a
different negative CTL value. The event is reported on the button UP only. The
return values are shown in the chart below.
Editing or Behaviour
Description Use 'MN' to end Edit Mode. This is the opposite of the 'ME' Mnemonic, p.616. After
use of the 'MN' mnemonic, all keystrokes or negative CTL events not used by the
input will be thrown away, and not returned to the program.
Example 0090 OBTAIN (0,SIZ=1,ERR=0090)@(0,0),'CURSOR'("off"), 'ME',IN_VAR$,'MN'
Character Display
Format 'MODE'(attrib[$])
Where:
attrib[$] Attribute represented by a string or numeric value.
Description Use 'MODE' to directly reset the current attributes and colour of text in a
character-based display.
Note: This mnemonic is supported for backwards compatibility of legacy code. For
graphical applications, use the mnemonics listed under GUI Display, p.579.
A one-, two- or three-character attribute string is represented as follows:
1 character changes the attribute only.
2 characters change the foreground & background colours only.
3 characters change the attribute (represented by first character) as well as the
foreground & background colours (represented by second and third characters).
If a numeric value is provided, the low order 8 bits is considered as a single character
string and is assumed to contain the new attribute setting. If either of the colour
bytes contain the value $FF$ then the colour byte is ignored and the current colour
(foreground or background) remains as is.
The attribute byte is defined as follows:
$01$ Background
$02$ Inverse Video
$04$ Blinking
$08$ Underscore
$10$ Graphic character
Description Use either 'MOVE' or 'WM' to relocate the current window to a new placement starting
with the top left corner at the col,line (column and line) coordinates.
Description Use 'MP' to switch the printer from serial printer mode to line printer (parallel)
mode. In line printer mode, overstrike data will print on top of existing characters at
their positions on the print line. Use 'MS' to switch the printer to serial mode. See
also 'SP' System Parameter, p.683.
Description Use 'MS' to switch the printer from line printer (parallel) mode to serial printer
mode. In serial printer mode, overstrike data will replace existing characters on the
print line. Use 'MP' to switch the printer to line printer (parallel) mode. See also 'SP'
System Parameter, p.683.
Description Use '-N' to generate an Error 11 on a DROP_BOX WRITE " " or LIST_BOX WRITE " "
if no such entry exists. '+N' tells the system to clear any selected item when writing
a null string. These mnemonics have no effect on multi-select list boxes.
Editing
Description Use 'NI' to indicate that the next input is to contain only numeric data ( 0-9, -, $, the
comma, and the decimal point).
Definition
Format '*O'=table$
Description '*O' (star-o) is used to create a 256-character terminal output conversion table. As each
character is sent to an output device, it is translated into a new character based on this
table, if defined. The outgoing character is translated to its numeric value in an ASCII
table (0-255) and this value is used as an offset into the 256-character table defined by '*O'
— the character at that offset will be used for output instead of the original character.
For additional information regarding the use of special mnemonics (i.e., '@@', '*C', '*I',
'*O', '*R', '*X', 'AT', 'GD', 'WX') when creating a device driver, see Dynamic Information
in Mnemonics, p.576 or Device Drivers, p.390 in the User’s Guide.
Behaviour
Format 'OPTION' (keyword$,value$)
Where:
keyword$ Named setting. Case-insensitive string expression (characteristic,
icon, font, colour index) described below.
value$ Value assigned to keyword$. String expression.
Description The 'OPTION' mnemonic allows various ProvideX environment settings, (typically set
via INI entries) to be changed on the fly at run time within a ProvideX session. These
include Item Colour Settings, Item Shading Settings, Icon Settings, Font
Settings, Resource Library, Colour Index, PDF Bookmarks, Debugging
Functionality, *WINPRT* Printing Options.
Note: Several other 'OPTION' settings are available specific to ProvideX thin-clients, such
as JavX and UltraFX. These are documented in the ProvideX Client-Server Reference.
Icon Settings
The following keyword$ settings can be used to control which icon, if any, is to be
used within the upper left corner of a window/dialogue:
"ICON" Set the icon for current and subsequent windows.
"WDWICON" Set the icon for the current window only.
The associated value$ may be the path and name of the image .ico file, or a full
icon specification. If a null value " " is specified for "WDWICON", then the icon is
removed from the current window. If it is an asterisk *, the default icon is displayed
for the window. For example,
PRINT 'dialogue'(1,1,80,25,"My Window",'cs',opt="i")
PRINT 'option'("WDWICON","C:\Windows\System32\Shell32.dll@137%32")
PRINT 'option'("WDWICON","")
PRINT 'option'("WDWICON","*")
Font Settings
The following keyword$ settings can be used to change various text plane and
graphic fonts on the fly:
"FONT" Set the current window’s text plane font.
"STDFONT" Set the session’s default text plane font.
"GRAPHICFONT" Set the current window’s default graphic font.
"STDGRAPHICFONT" Set the session’s default graphic font. If set, this must be
prior to drawing any GUI controls.
The associated value$ indicates the current font specification. Refer to the 'FONT'
Mnemonic, p.605 for specifications. If the numeric font size specified in value$ is
negative, then it provides the logical font height not the point size.
Resource Library
Resource libraries are DLLs that may contain icons and bitmaps for use in an
application. The following keyword$ can be used to change the current resource library:
"RESOURCELIB" Set the current resource library.
The associated value$ may be the path and name of the library .DLL file.
Colour Index
The following keyword$ can be used to manually define specific colours (via RGB
code) to be added to the internal colour index (palette):
"COLOURnnn" Set colour index number nnn.
"COLORnnn" Set color index number nnn.
While the index can include from 0 to 254 colours, the first 16 are predefined by
ProvideX (0 to 15). Existing index numbers may be re-assigned to a new RGB value;
however, new colours must be assigned in sequence using the next available index
number (i.e., COLOUR16, then COLOUR17, then COLOUR18 ...). Be aware that colours
defined via the 'COLOUR' mnemonic are added automatically to the next available
index number if they don’t already exist in the palette.
The associated value$ defines the colour assigned to the index number. This may be
any RGB code (RGB:n n n where n=0-255); e.g.,
PRINT 'OPTION'("Colour22","RGB: 200,200,200")
A null " ", either removes the assigned number from the index or resets it to the
default colour (if predefined by ProvideX); e.g.,
PRINT 'OPTION'("Colour64","") Clear out index number 64 for re-use
PRINT 'OPTION'("Colour7","") Reset to the ProvideX default
PDF Bookmarks
Bookmarks (used for selecting and automatically displaying specific pages) can be
added to generated PDFs. The following keyword$ sets the bookmark:
"BookMark" Set PDF bookmark.
The associated value$ defines a bookmark’s location, text, and hierarchy for a PDF.
For details, see Creating Bookmarks under *PDF* PDF Print Interface, p.738.
Debugging Functionality
Debugging functionality includes the ability to add watch values, set dynamic
breakpoints, initiate program tracing, as well as the ability to transfer the contents of
the debug window to the clipboard. This can be set on-the-fly using the keyword$
"DebugWindow", which determines the specific functionality based on the associated
value$ settings; e.g.,
PRINT 'OPTION'("DebugWindow","Trace"),
PRINT 'OPTION'("DebugWindow","Host Command Open"),
PRINT 'OPTION'("DebugWindow","Watch Add "x$"),
Multi-Use Commands
"Host [Break|Trace|Watch] [Enable|Disable]"
Enable/disable host trace option.
"[Host] [Break|Watch] Add "String to Add"
Add a (pre-formatted) item to the break|watch window.
When using the following commands, if the debug window type is not specified, then the last
window used will be utilized:
"[Host] [Break|Trace|Watch] Clear" Clear window contents
"[Host] [Break|Command|Trace|Watch] Close" Close window option.
"[Host] [Break|Trace|Watch] Copy" Copy window contents to Clip_Board.
"[Host] [Break|Command|Trace|Watch] Disable" Disable window without closing.
Graphical Printer
Format 'OFFSET'(x,y)
Where:
x,y Offset coordinates in thousandths of an inch. Numeric expression.
Description This is the 'OFFSET' property used for *WINPRT*. It allows the user to change the
offset to the printable area from the upper left corner of the page. For more
information on *WINPRT* properties, see the WINPRT_SETUP Directive, p.372, and
*WINPRT* Windows Printing, p.754.
GUI Display
Format Signal Pixel-to-Pixel Change: '+P'
Signal Line/Column Change: '-P'
Description Use '+P' to transmit mouse movements on any change of position (pixel by pixel
movement). Use '-P' to transmit mouse movements only on a change of line / column.
Character Printer
Description 'PE' contains the auxiliary port off sequence that tells the terminal to stop sending
output to the attached printer and to send output back to the terminal’s display area.
This should be defined in the device driver for the terminal type then retrieved and
set on the printer channel after opening the printer. To set the auxiliary port on
sequence use the 'PS' Mnemonic, p.630.
Graphical Display/Printer
Format 'PEN'(style,width,colour)
Where:
colour 'PEN' colour. Use colour code, colour name, or RGB setting; i.e.,
RGB:n n n where n=0-255. Options include:
0 - Black 8 - Dark Gray
1 - Light Red 9 - Dark Red
2 - Light Green 10 - Dark green
3 - Light Yellow 11 - Dark Yellow
4 - Light Blue 12 - Dark Blue
5 - Light Magenta 13 - Dark Magenta
6 - Light Cyan 14 - Dark Cyan
7 - White 15 - Gray
style Numeric code for fill pattern type. Supported options include:
0 - No Pen 3 - Dotted
1 - Solid Pen 4 - Dash-dot
2 - Dashed 5 - Dash-dot-dot
width Pen width, in graphical units. Numeric expression
Description Use 'PEN' to define the current pen style, width, and colour for graphics drawing.
Example 'PEN'(1,10,6)
'PEN'(1,"RGB: 192,192,192")
'PEN'(0,"Light Red")
Graphical Display/Printer
Format 1. Define Picture: 'PICTURE'(x,y,x,y,{name$|#chan[,transp_opt]}[,display_opt])
2. List Embedded Pictures: variable$='PICTURE'(*)
Where:
* Asterisk. To have ProvideX return a list of its embedded pictures; e.g.,
X$='PICTURE'(*)
PRINT X$
This argument is not directly supported in WindX. Use syntax similar to the
following to enable ProvideX on the server to retrieve a list of images
from the workstation:
CALL "[WDX]*Windx.utl;get_val","'picture'(*)",x$
#chan String consisting of a # plus the channel containing the graphic; i.e,
the channel opened via *BITMAP* , p.732.
display_opt Numeric code–define display of graphic. Supported options
include:
0=Align at top-left
1=Centre/crop within region
2=Scale to fit
3=Tile bitmaps to fill the given area
4=Halftone for enhanced legibility (may lighten black images)
5=Scale with proper aspect ratio but output in top left
6=Scale with proper aspect ratio but centred in the region.
For options 0, 2, and 3, the image is cropped to fit within the region
for the screen and *WINPRT* output; however, no cropping is
supported with *PDF*. For option 3 (tiled) and PDF, only images
that fit completely inside the region will be output (no cropping).
name$ Name of graphic (e.g., C:\your_PATH\your.bmp). String
expression. The icon filename must have .ico as an extension.
x,y,x,y Point / position coordinates for top left and bottom right, in
graphical units. Numeric expression.
transp_opt Transparency options:
G specifies that all colours of RGB value 192,192,192 (Light Gray)
are considered to be transparent.
T specifies that the colour of the first pixel in the upper left corner
of the image is to be transparent.
Note: The transparency options are not intended for printed output (i.e.,
*WINPRT*, *BITMAP*, *PDF*) and can produce incorrect results. Under
UNIX/Linux, the use of these options with *PDF* will generate an
Error #99: Feature not supported.
Description Use 'PICTURE' to draw (print) a picture on the device (e.g., terminal). x,y,x,y
coordinates define placement and size (top left and bottom right corners). Use
graphical units or @X(col) and @Y(line) functions for the various coordinates.
For displaying image transparency, place a G or T at the end of the image filename;
i.e.,
PRINT 'PICTURE'(1,1,100,100,"myimage.bmp,T",0)
BUTTON 10,@(40,2,10,1.6)="{myicon.ico,T}&Name"
For internal images (i.e., those specified with an exclamation within braces
{!imagename}), it is not necessary to use the G option because ProvideX always
assumes this transparency on an internal bitmap, unless it is overridden with T.
Transparent images are only supported when the picture does not need to be scaled.
ProvideX cannot mask a scaled bitmap since the scaling process may alter colour codes.
Graphical Display/Printer
Format 'PIE'(x,y,radius,aspect,angle_1,angle_2)
Where:
angle_1 Starting angle, in degrees. Numeric expression.
angle_2 Ending angle, in degrees. Numeric expression.
aspect Aspect ratio / viewpoint. (Ratio=1 results in no tilt.) Numeric expression.
radius Radius of the pie, in graphical units. Numeric expression.
x,y Coordinates for the centre of the pie, in graphical units. Numeric expression.
Description Use 'PIE' to draw (print) a pie slice on the device (e.g., terminal). Use graphical units
or @X(col) and @Y(line) functions for x, y, and radius. The pie slice extends from the
starting angle1 to angle2. The 'PIE' mnemonic uses current attributes for the 'FILL'
Mnemonic, p.603, and the 'PEN' Mnemonic, p.626.
Example The following example displays a pie cut into two uneven slices:
0030 PRINT 'PEN'(1,3,8),'FILL'(2,6)
0040 PRINT 'PIE'(224,450,100,1,45,1)
0050 PRINT 'PEN'(1,3,6),'FILL'(4,15)
0060 PRINT 'PIE'(260,440,100,1,1,45)
Graphical Display/Printer
Description Use 'PM' to switch to portrait mode when printing to *WINPRT*, p.754. This is the
opposite of the 'LM' Mnemonic, p.614.
Graphical Display/Printer
Format 'POLYGON'(x,y,x,y,x,y,x,y ...)
Where:
x,y Set of point/position coordinates in graphical units. Numeric expression.
Description Use 'POLYGON' to draw (print) a polygon (e.g., triangle, hexagon ...). ProvideX joins
the various x,y points to form the polygon. Use graphical units or @X(col) and
@Y(line) functions for the coordinates.
The 'POLYGON' mnemonic uses current attributes for the 'FILL' Mnemonic, p.603,
and the 'PEN' Mnemonic, p.626.
Example The example below creates an irregular four-sided figure by setting the coordinates
for the four corners:
0030 PRINT 'PEN'(1,3,8),'FILL'(2,6)
0040 PRINT 'POLYGON'(224,450,100,100,400,200,390,390)
Description Use either 'POP' or 'WR' to remove the current window from the top of the stack and
restore the previous window.
Character Printer
Description 'PS' contains the on sequence that tells the terminal to route incoming characters to the
auxiliary port instead of the terminal’s display area. This sequence remains active until
an off sequence is encountered via the 'PE' Mnemonic, p.626. This should be defined in
the device driver for the terminal type then retrieved and set on the printer channel.
Description Use either 'PUSH' or 'WC' to save and copy the current window to create a new
window with exactly the same size, position and attributes.
Definition
Format '*R'=command$
Description '*R' (star-r) contains the operating system command that will be executed when the
channel is closed and after all printing is completed.
For additional information regarding the use of special mnemonics (i.e., '@@', '*C', '*I',
'*O', '*R', '*X', 'AT', 'GD', 'WX') when creating a device driver, see Dynamic Information
in Mnemonics, p.576 or Device Drivers, p.390 in the User’s Guide.
Editing
Description Use 'RB' to ring the bell.
Editing
Description Use 'RC' to return the current cursor address as a four-character string containing the
current line and column. The value will be returned in the input queue, just as a
keystroke would, and may be read via a READ RECORD.
Graphical Display/Printer
Format 'RECTANGLE'(x,y,x,y,radius)
Where:
x,y,x,y Coordinates for top left/bottom right corners, in graphical units.
radius Positive integer representing the rounding factor for corners. A negative
value will have its sign flipped. If the radius exceeds half the height (or
width), the system assumes a semi-circle is used to round the edge.
Description Use 'RECTANGLE' to draw (print) a rectangle defined by two sets of x,y coordinates.
Use graphical units or @X(col) and @Y(line) functions for the coordinates. The
'RECTANGLE' mnemonic uses current attributes for the 'FILL' Mnemonic, p.603, and
the 'PEN' Mnemonic, p.626.
Example 0030 PRINT 'PEN'(1,3,8),'FILL'(2,6)
0040 PRINT 'RECTANGLE'(100,100,400,600)
0040 PRINT 'RECTANGLE'(700,100,820,220,30)
Description All input or output following this mnemonic will be in red foreground or
background.
Editing
Description Use 'RL' to return the contents of the current line with the next terminal input.
Note: In graphics mode ( 'GS' ), if a terminal mnemonic transmits the contents of the
screen to the program, the data consists of four bytes for each character. The first two
bytes are background and foreground characters, the third byte holds character
attributes, and the fourth byte is the actual character on the screen.
Behaviour
Description Use 'RM' to reset to default modes/attributes (colour, reverse video mode,
underscoring mode, etc.). See also 'SN' Native Screen Mode, p.636 and 'SX' Set
Extended Screen Mode, p.637.
Editing
Description This mnemonic performs the same function as 'TR' Terminal Read from Start,
p.639, except that it reports values from the current cursor location to the end of the
screen. ('TR' returns the screen contents from 0,0 to the current cursor location.)
Motion
Description Use 'RT' to move the cursor one column to the right.
Description When you use '+S', ProvideX automatically replaces two or more occurrences of the
underscore, dash or equals sign ( _ - =) with solid underlines in graphics mode when
printing to *WINPRT*. This only applies to fields that are printed separately. (Primarily for
use in legacy code where these characters were used in place of solid lines.) Use '-S' to
disable '+S'.
Character Printer
Description Use 'Sn' to slew to the channel specified by n. 'S6' is the same as 'VT' . See 'EL' End VFU
Load, p.600, 'SL' Start VFU Load, p.636, and 'VT' Slew to S6, Vertical Tab, p.641.
Character Display
Description Use 'SB' to set background mode. (Characters are displayed at low intensity /
dimmed.) To clear background mode, use the 'CF' Mnemonic, p.591. (See also: 'SF'
Set Mode to Foreground, p.635.)
Description Use 'SCROLL' to define or change the scroll region in the screen / window. All subsequent
mnemonics for cursor position, clearing, deletion and insertion will only affect this
defined area.
If the cursor advances beyond the last line: when 'SCROLL' is ON, ProvideX moves all the
lines on the screen up one line; when 'SCROLL' is OFF, ProvideX returns the cursor to the
first column in the first line. Use 'SE' or 'SD' to enable or disable the scroll region. Use 'SR'
or 'SCROLL'("RESET") to reset the scroll region to the full window / screen. For a
window with a border, the border is included in the scroll region.
Note: The values ON, OFF and RESET can be literals, variables or string expressions.
Character Display
Description Use 'SF' to set foreground mode. (Characters are displayed at high intensity.) To clear
foreground mode, use the 'CF' Mnemonic, p.591. (See also: 'SB' Set Mode to
Background, p.634.)
GUI Display
Format 1. Show Window: 'SHOW'(n)
2. Hide Window: 'HIDE'
Where:
n Numeric code. Supported options include:
0 = Minimizes current window
1 = Restores current window to normal display state
2 = Maximises current window
3 = Resizes current window to previous display state
-1 = Hides the current window.
Description Show or hide a window (graphics display only). The default is to display the
window.
Note: You must restore or show a hidden window through your program, since you
can't send data input directly to it.
GUI Display
Format ‘SIZE'(width,height)
Where:
width,height Window's width in columns and height in lines. Numeric expression.
Note: There is no effect on the 'SIZE' mnemonic when you use 'MAXSIZE' &
'MINSIZE' to control the window size that the user can set.
Character Printer
Description Use 'SL' to start VFU load. The data following 'SL' (from 'SL' up to an 'EL') defines the
VFU channels. The total number of characters defines the page length, the characters
themselves represent the channels that can be slewed to. The first character must be
a 1 (channel 1). See 'EL' End VFU Load, p.600, 'Sn' Slew to Channel, p.633, and
'VT' Slew to S6, Vertical Tab, p.641.
Behaviour
Description Default. When you use 'SN', the "clear" mnemonics fill the cleared regions with the
current colour and Reset Mode (the 'RM' Mnemonic, p.632) resets the output to the
default colours. See also: 'SX' Set Extended Screen Mode, p.637.
Example 10 open(1)"LP"
20 print (1)"NORMAL"+'cp'+"COMPRESSED"+'SP'+"NORMAL"
30 close(1)
If the example above were run in ProvideX, the word COMPRESSED would be in
condensed print and the word NORMAL would be in standard print. (In some other
Business Basics, the font for the complete line is affected and for this example, all text
would be in standard print.)
Behaviour
Description Use 'SX' to set extended screen mode. The "clear" mnemonics fill the cleared regions
with the default colour and Reset Mode (the 'RM' Mnemonic, p.632), turns off all
visible attributes. See also 'SN' Native Screen Mode, p.636.
Note: This feature is included for compatibility with other languages. For additional
information on conversion and compatibility modes, refer to the ProvideX website
www.pvx.com .
Description Use '+T' to re-enable the display of the text screen and have ProvideX redraw the text plane.
Note that this can cause flickering in some cases. You can use '-T' to disable the display and
avoid flickering. Refer to the example for the 'DIALOGUE' Mnemonic, p.597.
Graphical Display/Printer
Format 'TEXT'(x,y[,x,y],text$,attrib$)
Where:
attrib$ Optional attribute string. Valid codes include:
& Underscore the character following the '&' (as in hot keys)
C Centre text
F Show focus lines around text
N Numeric data alignment
R Right Justify
S Applies background colour to area directly behind text.
W Word wrap
# Same as N
text$ String expression.
x,y,x,y Point coordinates for top left and (optionally) bottom right, in graphical
units. Numeric expression.
Description Use 'TEXT' to draw (print) text in graphics mode, starting at the point set by the first
x,y coordinates. Use graphical units or @X(col) and @Y(line) functions for the
various coordinates. The 'TEXT' mnemonic uses current 'FONT' and colour attributes
(i.e., 'RED', 'BLUE', ...).
Use the optional second set of x,y parameters to define the bottom right corner of a
rectangular region for displaying the text. You can use the functions TXH( ), p.540,
and TXW( ), p.541, to make sure the text fits the region.
Note: For Windows printers, if the current background colour is white, the output
will be considered transparent (i.e., with no background fill).
Description Use 'TEXTWDW' to create a text mode window under Windows. If you include a title,
a box of the defined height and width will be drawn around the window and the
title will be left-justified on the top line of the box.
See also 'DIALOGUE' Define / Draw Dialogue Region, p.596 and WINDOW'
Define / Draw Window, p.643.
Editing
Description 'TR' transmits an image to a program as a string. Normally, 'TR' reads from 0,0 to the end
of the screen; however, when in BBx emulation mode (SET_PARAM 'BX'), 'TR' reads from
0,0 to the current cursor position.
The 'RP' mnemonic has the same functionality as 'TR' except that it is not affected by BBx
emulation. See also 'RP' Terminal Read to End, p.632, 'RC' Return Cursor Address,
p.631, and 'RL' Return Line Contents, p.632.
Note: In graphics mode, if a terminal mnemonic transmits the contents of the screen
to the program, the data consists of four bytes for each character. The first two bytes
contain background and foreground characters, the third byte holds character
attributes, and the fourth byte holds the actual character on the screen.
Editing
Description Use 'TW' to transmit a list of active windows to the program as a string of 1-byte
numerical values $00$ to $FF$ (to be read in the next INPUT statement).
Description PVX Windows only. '+U' turns on screen refresh. '-U' turns it off. The default is on.
Editing or Behaviour
Description Use 'UC' to convert all subsequent user input to upper case. To end upper-case
conversion and allow the use of mixed case, use the 'LC' Mnemonic, p.613.
Motion
Description Use 'UP' to move the cursor up one line.
Description The terminal mnemonic '+V' turns on full-line highlighting of a list view (report
style) list box. When the user clicks anywhere on a row, the entire row will be
highlighted. If '-V' is used, and the user clicks anywhere on the row, only the first
column of the row will be highlighted.
By printing either of these mnemonics, you can adjust the highlight style for your
application without having to modify each occurrence of a list view (report style) list box
in your application. (See Row Highlighting, p.191.)
Character Printer
Description Slew to S6, Vertical Tab 'VT'. See also 'EL' End VFU Load, p.600, 'SL' Start VFU
Load, p.636, and 'Sn' Slew to Channel, p.633.
Description Use '+W' to enable creation of Windows-style windows. Use '-W' to disable Windows
style. When Windows-style is disabled, all windows are created with text characters.
Description All input or output following this mnemonic will be in white foreground or
background.
Description Use either 'WINDOW' or 'WA' in the format to draw (print) a new window. If you
include a title, a box of the defined height and width is drawn around the window.
The title will be left-justified on the top line of the box unless the 'AH' system
parameter is set.
ProvideX uses the WS_BORDER and WS_THICKFRAME frame styles from the
Windows API with the 'WINDOW' mnemonic. For more information, see Windows
API Frame Styles, p.575. See also: 'DIALOGUE' Define / Draw Dialogue Region,
p.596 and 'TEXTWDW' Create Text Window, p.639
Character Printer
Description Included for completeness only. Use 'WP' for 40-column mode, wide printer (legacy
DOS systems). See also: 'EP' Start Expanded Print, p.601.
Behaviour or Editing
Format Long or short forms:
1. Set WrapAround On: 'WRAP'("ON") or 'BW'
2. Set WrapAround Off: 'WRAP'("OFF") or 'EW'
Description Set 'WRAP' ON / OFF to control automatic word-wrapping at the end of the line, or
use 'BW' Begin WrapAround, p.589, and 'EW' End Wrap Around, p.602.
ON (Default): Information is entered in the last column of the screen or window
region, the cursor will advance to the first position of the next line.
OFF: Continued output over-types at the last position on the line.
Definition
Format 'WX'=esc_seq$
Description Use 'WX' to define the escape sequence for creating a window on the specific
terminal type. However, very few terminals have the ability to create independent
windows in their display area.
For additional information regarding the use of special mnemonics (e.g., '@@', '*C', '*I',
'*O', '*R', '*X', 'AT', 'WX') when creating a device driver, see Dynamic Information in
Mnemonics, p.576 or Device Drivers, p.390 in the User’s Guide.
Definition
Format MNEMONIC (chan)'*X'="prog_name[;entry][;params]"
Where:
chan Channel or logical file number for which the mnemonic is defined.
entry Name of starting line label to use as entry point in the program.
Optional. If included, add to the prog_name string expression
(e.g., RUN "PROG;STARTING_LABEL").
params Parameters (if any) needed in your CALLed program.
prog_name Name of the program. String expression.
Description '*X' (star-x) contains the pathname of a program to CALL on the closing of a channel.
When a file is closed, ProvideX issues a CALL to the program/entry point specified
by the contents of '*X'. This takes place just prior to the file being actually being
closed, allowing the program to alter the contents of the file if desired.
To retrieve the parameter list, the called program should reference PGM(-3), which
contains the complete string contained in the '*X' mnemonic definition.
For additional information regarding the use of special mnemonics (i.e., '@@', '*C', '*I',
'*O', '*R', '*X', 'AT', 'GD', 'WX') when creating a device driver, see Dynamic Information
in Mnemonics, p.576 or Device Drivers, p.390 in the User’s Guide.
Example -:LOAD "TSTX"
-:LIST
0010 LBL:
0020 MSGBOX "HELLO--"+SEP+"FIL="+STR(LFA)+SEP+"MNM="+MNM('*X',LFA)
0030 END
-:OPEN (1)"\JUNK.TXT"
-:MNEMONIC (1)'*X'="TSTX;LBL;My backspace key is orange"
-:CLOSE (1)
GUI Display
Format Windows ’X’ Close Button On: '+X'
Windows ’X’ Close Button Off: '-X'
Description When the '+X' mnemonic is set, use of an X icon is set as the default for when new
windows are created.
Character Display
Description Included for completeness only. Use 'XP' to control EGA / VGA 43/50 line mode
display (legacy DOS systems). See also: 'CP' Condense Print for Screen, p.593 and
'SP' Standard Print, p.636.
Description All input or output following this mnemonic will be in yellow foreground or
background.
GUI Display
Format Text Mode with Windows Look: '+Z'
Windows Look Off: '-Z'
Description The terminal mnemonic '+Z' gives text mode screens a Windows look and feel. This does
not turn text mode screen into Windows screens, but it does provide a more GUI-like
appearance.
Behaviour
Description Use 'ZX' to resolve inconsistency in the attributes format and the FIN values when
you run ProvideX with code designed for BBx. (In prior versions, the attributes as
returned when issuing a Terminal Read from Start, 'TR', p.639 in graphics mode had
the foreground and background values reversed and an incorrect window scroll
region position.) If you print the 'ZX' mnemonic, ProvideX reports the attributes and
FIN values consistent with BBx.
System Parameters
'1U' 'DB'= 'FP' 'LM' 'OM' 'QT' 'TN' 'XI'
'3D' 'DC' 'FS'= 'LP' 'OP' 'RI' 'TT'= 'XL'
'AD' 'DD' 'FT' 'LS'= 'OR' 'RN'= 'TU' 'XS'=
'AH' 'DF'= 'FU' 'LU' 'OW'= 'RP' 'TX' 'XT'
'AI'= 'DL'= 'FX' 'LW' 'PC'= 'RR' 'UL' 'ZP'
'AP' 'DP'= 'HC' 'LZ' 'PD'= 'RS' 'UM' '!9'
'AW' 'DT'= 'HP' 'MB'= 'PE' 'SB' 'VC' '!B'=
'B0' 'DW'= 'I0' 'MC' 'PF' 'SC' 'VM' '!D'
'BF'= 'EG' 'I2' 'MF'= 'PL'= 'SD' 'VP'= '!F'
'BL'= 'EL'= 'IC' 'MP' 'PO' 'SF' 'VR'= '!I'
'BT' 'EO' 'IM' 'MS'= 'PP' 'SK' 'VW'= '!K'
'BX' 'ES' 'IR' 'MX' 'PQ' 'SL'= 'WB' '!Q'=
'BY'= 'EX' 'IS'= 'NE' 'PS'= 'SP' 'WD'= '!R'=
'CD' 'F,' 'IW' 'NI' 'PT' 'SR' 'WF' '!S'
'CE' 'F4' 'IZ'= 'NK' 'PU' 'SS' 'WH'= '!T'
'CF' 'FB'= 'JC' 'NL' 'PW'= 'SV'= 'WI'= '!U'=
'CH'= 'FC' 'KF'= 'NN' 'PZ' 'SW'= 'WK' '!V'
'CI' 'FE' 'KR' 'NR' 'Q_'= 'SZ'= 'WL' '!W'
'CO'= 'FF'= 'LB'= 'NS' 'Q^'= 'TA'= 'WP' '!X'
'CS' 'FI' 'LC' 'NX' 'QD'= 'TB' 'WT'= '*K'
'CT'= 'FL' 'LD' 'OC' 'QF'= 'TC'= 'WZ'= '*L'
'CU'= 'FN' 'LE' 'OF'= 'QK' 'TH'= 'XC'
'D0' 'FO'= 'LF' 'OL'= 'QS' 'TL' 'XF'
Overview
Overview
System parameters are used at start-up to define a system's operation under ProvideX.
Each consists of a two-character code enclosed in single quotes. Most parameters are
Boolean switches (0 or negative sign indicates off, 1 or no sign indicates on), but some
require specific values in order to be set. See Setting / Resetting Parameters below.
Note: In this reference, some parameters are always described with an equal sign to
indicate that they are set (on) using non-Boolean values; e.g., 'BY'= or 'DW'=.
Most often, system parameters are set only once at the beginning of an application,
typically in a start up program; however, any system parameter can be set or reset in
your software at any time, whenever required.
For related information and examples, refer to the SET_PARAM Directive, p.302, the
PRM System Variable, p.566, and the PRM( ) Function, p.500.
The SET_PARAM directive, and the ProvideX *UCP utility, allow you to alter the
current settings of system parameters. The specific method for setting/resetting each
parameter is explained with each definition.
Examples:
SET_PARAM 'AH' Switches Alternative Heading on
SET_PARAM -'AH' Switches Alternative Heading off
SET_PARAM 'AH'=0 Switches Alternative Heading off.
SET_PARAM 'BY'=0 Sets the Base Year to Julian calendar base
SET_PARAM 'BY'=1970 Sets Base Year to 1970.
Off: Parameter shows a negative sign or is set to equal 0 zero.
On: Parameter is not negative or is set to equal a specific value.
Parameter Defaults
Paramet rDefaults
The PRM System Variable, p.566, can be used to return a string of the current
system’s parameters and their values. (Some will be hidden from the PRM list unless
they are actually set.) PRINT PRM lists the following defaults in ProvideX for
Windows 32-bit:
PRINT PRM !
-'3D',-'AD',-'AH','AI'=10,-'B0','BF'=10,-'BT',-'BX','BY'=1970,-'CD','CS',
'CT'=0,'CU'=36,-'D0',-'DC','DF'=0,'DL'=0,'DP'=46,'DT'=0,'DW'=0,-'EG','EL'=0,
-'EO',-'ES',-'EX',-'F4','FB'=5,-'FC','FF'=0,-'FI','FO'=0,-'FU',-'FL','FP',
'FS'=138,-'FT',-'FX',-'F,',-'I0',-'I2','IC',-'IM','IR','IS'=5,-'IZ',-'KR',
'LB'=4,-'LC',-'LD',-'LE','LS'=1,-'LU',-'LZ','MB'=0,-'MC','MF'=50,-'MP','NE',
-'NI',-'NK',-'NL',-'NN',-'NR',-'OC','OL'=25,'OM',-'OP','OR','OW'=0,'PC'=0,
'PD'=2,-'PO',-'PU','PW'=36,-'PZ','QF'=1,'Q_'=2,'Q^'=2,-'QS',-'QT',-'RI',
'RN'=1,'RP',-'RR',-'RS',-'SC',-'SD',-'SF',-'SK','SL'=32,-'SP',-'SR','SV'=1,
'SZ'=32000,-'TB','TC'=0,'TH'=44,-'TL',-'TN',-'TT',-'TU',-'TX','VP'=48,'VR'=0,
'VW'=0,'WB','WD'=10000,-'WF','WH'=0,'WI'=1000,-'WK','WT'=2,-'XC',-'XF',-'XI',
-'XT',-'ZP',-'DD','!B'=3,'!U'=0,-'1U'
To avoid conflicts with other software components, we strongly recommend that you save
the current settings for parameters you need to change, and then reset them when done.
Note: The 'BX' parameter is the only exception to this recommendation, since it affects
a series of system parameters. Never attempt to save/change/restore 'BX'. It should be
set/reset only at the start of a session.
Example:
0010 sv_ex=prm('ex'); SET_PARAM -'EX'
.....
9900 SET_PARAM 'EX'=sv_ex
The following parameters are listed in ASCII sort-order, except for those beginning
with either an exclamation mark ! or an asterisk *, which are at the end of the chapter.
Where noted, the parameters are system-specific.
Note: An equals sign in the heading indicates that the parameter described requires more
than a simple Boolean switch to be set; e.g., 'LB'= accepts a code number from 0 to 7 that
represents a colour option. Other descriptions assume that the parameter is simply set to on
or off ; e.g., 'AH' or -'AH' or 'AH'=0. See Setting / Resetting Parameters, p.650.
Description Forces ProvideX to use a dedicated user slot for the session. This removes the shared
nature of ProvideX under Windows or WindX and also affects FacetTerm sharing.
Default Off. ProvideX attempts to use shared user slots for the session. That is, the same terminal
is considered a single user regardless of the number of invocations. TCB(27) returns the
User Slot Number this session is using and determines whether it is dedicated, shared,
or a background task. Refer to the TCB( ) Function, p.530.
Note: Once you set '1U' on, you can't turn it off unless the application terminates.
Description Displays 3D look in Windows. Use the '2D' Mnemonic, p.581, '3D' Mnemonic,
p.582, or the '4D' Mnemonic, p.582 instead.
Default Off.
Description Uses alternative 'WINDOW'/'BOX' heading (with the title in inverse video, centred
on the top line).
Default Off. The title is text, left-justified on the top line of the 'WINDOW' / 'BOX'.
Description Assigns a value for the default line numbering increment for LOAD, RUN, CALL, or
PERFORM directives with an ASCII text program and/or when you use the AUTO
directive.
Default 'AI'=10 (i.e., auto increment by 10).
Note: 'AI' is reset to the default increment (10) when a START is issued. If the 'UL'
parameter is set, it will override the 'AI' parameter for line numbering .
Description Processes options selected during *WINPRT* Printer Selection dialogue to be used
for *PDF* output instead.
Default Off.
Description Sets zero as the base number for level and window. For WindX environments, this
parameter must be set on both the client and the server.
Note: This setting affects the HWN( ) function, which relies on the base window
number. (See HWN( ) Function, p.451.)
H
Warning: If the application is run with ‘B0' set, ensure that it is set on both the UNIX
host and the WindX PC. Otherwise, the wrong windows will be addressed. Set 'B0'
either by using -B0 as an argument on the WindX PC's startup command line or as a
statement from the host; i.e., EXECUTE "[wdx]SET_PARAM 'B0'".
Description Assigns the number of common database Keyed I/O buffers to be maintained by the
system.
Default 'BF'=10.
Note: When 'BF'=0 (zero, no common buffers), ProvideX uses the setting in 'FB'
Dedicated File Buffers, p.661.
Description Specifies breaks in long lines at the first comma, plus sign, or the words OR and AND,
which occur on or after the number of columns specified.
Default 'BL'=0.
Description Sets binary test for serial files on first read. If a size is indicated (ISZ=option), then the
file is treated as binary. Otherwise, the file is treated as record oriented.
Default Off.
Description Sets ProvideX to BBx emulation mode. This automatically resets certain system
parameters to behaviour required to run programs designed for BBx.
Note: Use the 'LZ' Suppress Leading Zeros, p.669, to control rounding of leading
zeros. (This functionality was previously controlled by the 'BX' parameter.).
The following parameters are affected by the 'BX' parameter: 'AD', 'B0', 'BT', 'BY'=,
'CD', 'DC', 'EX', 'FF'=, 'I0', 'JC', 'KR', 'MP', 'NR', 'OP', 'QS', 'RS', 'WK', 'XF'. For WindX
environments, this parameter must be set on both the client and the server.
Default Off. ProvideX is in standard mode ('FF'=0).
Description Defines the base year for the JUL( ) Function, p.459, and the DTE( ) Function, p.418.
Default 'BY'=1970.
Note: The JUL( ) function uses January 1 of the base year as day 0 zero.
Also: If you SET_PARAM 'BY'=0 zero, the JUL( ) and DTE( ) functions operate under
the Julian calendar where day 0 is around 4713 BC.
Description Checks the current directory first before checking the prefix list for a file.
Default Off. Searches current directory after the prefixes (normal method).
Setting PVX UNIX/Linux Only. Bypasses console flush for print statements. Use 'CF' to
improve display performance (i.e., no waiting for OS acknowledgment after every
PRINT statement).
Default Off. Performs a console flush on print statements.
Description Controls the text colour of an object that has a hover attribute when the mouse is not
over the object. Supported options include:
0 - Current 8 - Dark Gray
1 - Light Red 9 - Dark Red
2 - Light Green 10 - Dark green
3 - Light Yellow 11 - Dark Yellow
4 - Light Blue 12 - Dark Blue
5 - Light Magenta 13 - Dark Magenta
6 - Light Cyan 14 - Dark Cyan
7 - White 15 - Gray
Default 'CH'=12 (Navy blue).
Setting Enhances performance when reading files opened with an IOL=* by caching
variables associated with the internal IOList.
Default On.
Description Controls the text colour of an object that has a hover attribute when the mouse is
over the object.
Supported options include:
0 - Current 8 - Dark Gray
1 - Light Red 9 - Dark Red
2 - Light Green 10 - Dark green
3 - Light Yellow 11 - Dark Yellow
4 - Light Blue 12 - Dark Blue
5 - Light Magenta 13 - Dark Magenta
6 - Light Cyan 14 - Dark Cyan
7 - White 15 - Gray
Default 'CO'=4 (Blue).
Setting On. Displays program with coloured syntax when using the LIST Directive, p.176,
and the LST( ) Function, p.473.
Off. Does not display coloured syntax.
Default On.
See Also '*H' Mnemonic, p.609.
Description PVX Windows/WindX Only. Adjusts character time-outs for slower LPT devices.
This value specifies the multiplier, in milliseconds, used to calculate the total
time-out period for write operations to LPT devices. For each write operation, this
value is multiplied by the number of bytes to be written.
Default 'CT'=0
Description Assigns the currency symbol / character to be used in formatted numeric data I/O.
Use the ASCII value of the character.
Default 'CU'=36 or 'CU'=ASC("$")
Description Controls various aspects of the dynamic buffering logic. Valid settings are as follws:
1- Share O/S file handles when files are opened on multiple channels.
2- Use local buffers when files are shared.
4- Allocate optimum number of buffers when updating files.
8- Add common buffers when single update requires more buffers than are available.
16 - Maintain key buffers and inventory pages by dropping data buffers first.
The above values are additive; e.g., to set 1 and 4, use SET_PARAM 'DB'=5.
Default 'DB'=31. All settings (1+2+4+8+16).
Description Sets destructive cursor. (Moving from left to right, replaces intervening characters
with spaces up to the new cursor position).
Default Off. The cursor jumps over the intervening characters.
Example SET_PARAM 'DC'=0
PRINT @(15),"B", @(10), "A", @(20), "C"
With 'DC' off, the screen output is " A B C". The cursor jumps first to column 15
and prints the B, jumps to column 10 and prints the A, then finally jumps to column
20 and prints the C.
SET_PARAM 'DC'
PRINT @(15),"B", @(10), "A", @(20), "C"
With 'DC' on, ProvideX uses a destructive cursor (line print mode, as in BBx and
some MAI systems). The preceding example would result in " A C", because the
output driver simply issues spaces when advancing on the same line. With 'DC' on,
after printing the B and A, the driver uses 9 spaces to position itself at column 20 to
print the C. The destructive cursor overwrites the B with the space.
Description Replaces reverse slash (\) in Windows path names with a standard slash (/).
Default Off. No replacement of delimiter occurs.
Description Adds automatic delay times after a each 'FF' without having to insert WAIT
statements into your application. Use this parameter to have ProvideX return control
to the OS for longer periods of time. 'DF'=num is a numeric value from 0 to 1000:
0 indicates no delay (default)
1 indicates a forced WAIT 0 when the event occurs.
All other values from 2 through 1000, indicate the number of 100ths of a second to
delay on each event occurrence. (See also: 'FF' Mnemonic, p.603.)
Note: The 'DF' delay only applies to 'FF' when sent to a device, Windows print spooler,
or a WindX-connected file.
Description Adds automatic delay times after a each 'LF' without having to insert WAIT
statements into your application. Use this parameter to have ProvideX return control
to the OS for longer periods of time. 'DL'=num is a numeric value from 0 to 1000:
0 - indicates no delay (default)
1 - indicates a forced WAIT 0 when the event occurs.
All other values from 2 through 1000, indicate the number of 100ths of a second to
delay on each event occurrence.
Default 'DL'=0. No Delay.
Note: The 'DL' delay only applies to 'LF' when sent to a device, Windows print spooler,
or a WindX-connected file.
Description Assigns decimal point symbol / character for use in formatted numeric data. Use the
ASCII value of your character. For WindX environments, this parameter must be set
on both the client and the server. In order for this format to be applied in numeric
masking, the mask must be identified as numeric using the # character (see Numeric
Format Masks, p.808).
Default 'DP'=46 or 'DP'=ASC("."), the decimal point.
Note: The 'DP' setting is used if I/O is formatted in INPUT, OBTAIN, PRINT and the STR( )
function (and ignored for unformatted I/O). It is always ignored by the NUM( ) function
and when using WRITE, READ, FIND or EXTRACT directives in converting numeric data.
Description Sets the number of seconds to wait for output to a device before a device error is
returned.
Default 'DT'=0
Description Adds automatic delay times after 'WI' is exhausted without having to insert WAIT
statements into your application. Use this parameter to have ProvideX return control
to the OS for longer periods of time. 'DW'=num is a numeric value from 0 to 1000:
0 - indicates no delay (default)
1 - indicates a forced WAIT 0 when the event occurs
All other values from 2 through 1000, indicate the number of 100ths of a second to
delay on each event occurrence.
Default 'DW'=0. No Delay
Note: The 'EG' parameter affects all file channels while the 'BG' and 'EG' mnemonics affect
specific channels.
Description Returns the current encryption setting, or sets encryption to a new level for password
protected programs. This allows ProvideX to load/run any password-protected
programs created with encryption levels 0 through 4 (5 levels in total). See also
PASSWORD Directive, p.238.
Default Varies by version of ProvideX.
Description Sets handling of embedded 'EO' mnemonics (to end output transparency). ProvideX
scans strings following a 'BO' mnemonic for embedded ESC+"EO". This parameter
simplifies the conversion to ProvideX from other languages.
Note: When 'EO' is on, any ESC+"EO" sequence embedded in the data will terminate
output transparency mode.
Default Off. The strings are not checked for embedded 'EO' mnemonics.
Example The example below shows a typical use of the 'BO' (begin) and 'EO' (end) output
transparency mnemonics. The 'EO' mnemonic is not embedded in the string, so
ProvideX will automatically recognize it and terminate a 'BO' mnemonic.
PRINT(chan)'BO',"some sequence",'EO'
In the next example, the 'EO' mnemonic is embedded in the string (appended using
the +plus sign).
PRINT(chan)'BO'+"some sequence"+'EO'
In this case, if the 'EO' system parameter is off (the default), the embedded 'EO'
mnemonic is ignored. When the 'EO' parameter is on, ProvideX recognizes the
embedded mnemonic and ends output transparency.
Description Sets display of OS extended status / errors in Command mode. 'ES' is used primarily by
developers to enforce good programming standards.
Default Off. No display of OS errors in Command mode.
Note: If the EXECUTE directive starts with a line number, ProvideX modifies the current
program and the line becomes part of the current program, unless the system parameter
'EX' is on, in which case it modifies the program at level 1.
Description Suppresses commas when numeric formats overflow (i.e., thousands separators are
stripped) and retry the format. For more information, see Data Format Masks, p.807.
Default Off. Generates an Error #43: Format mask invalid on format mask
overflows. (The error is not returned in cases like 0100 INPUT EDIT "Enter
value:",INV_AMT:"$##,##0.00" where the directive allows for more input
than the mask accommodates.)
Description Returns CTL=4 when the user chooses the Windows X close button in a window.
Default Off. Returns CTL=-1999.
Description Assigns the number of dedicated file buffers to use for each file.
Default 'FB'=5
Note: ProvideX uses the 'FB' setting if 'BF'=0 is set (zero, no common buffers).
Description DOS Only. Forces OS file-commit to any updated Keyed file on an INPUT or WAIT
statement.
Default Off. No forced flush.
Description Defines the format of information returned by the FID( ) function. There are 5
possible formats:
0 - ProvideX standard format
1 - Thoroughbred emulation
2 - Rexon emulation
3 - BBx emulation.
4 - BBx emulation. Sequential files are reported as binary files for the FID( ) function,
$03$ rather than a $01$ in position (1,1) of the FID.
Default 'FF'=0 (zero, for ProvideX standard format)
Note: When 'FF' is set to 0 or 4 and the 'PO' system parameter is switched on, the FID( ) and
FIB( ) functions return the original path used when the file was opened.
Also: The FID( ) and FIN( ) format layouts will be changed whenever there is a change to
the 'FF' system parameter.
See Also 'PO' System Parameter, p.676, FIB( ) Function, p.430, FID( ) Function, p.434, and
FIN( ) Function, p.437.
Description Suppresses Error #43 on format mask overflows. This parameter is not intended to
control errors generated when the mask character itself is invalid. For more
information, see Data Format Masks, p.807.
Default Off. Generates an Error #43: Format mask invalid for format mask
overflow errors.
Note: When the 'FL' system parameter is set to on, 'FU' is turned off automatically.
Also: The 'FN' system parameter may override the 'FL' setting.
See Also 'FN' System Parameter, p.663, 'FU' System Parameter, p.664, and the FFN( )
Function, p.428 (for a UNIX example using these parameters for case-insensitive
searches).
Default On, unless 'FL' or 'FU' are on. The 'FN' setting is not displayed in the list returned
using PRINT PRM.
See Also 'FL' System Parameter, p.662, 'FU' System Parameter, p.664, and the FFN( ) Function,
p.428 (for a UNIX example using these parameters for case-insensitive searches).
Description Assigns the format overflow symbol / character you want returned as fill on format
errors. Use the ASCII value of your character. For example, to assign the asterisk * as
the overflow character, apply either 'FO'=42 or 'FO'=ASC("*"). For more
information, see Data Format Masks, p.807.
Default 'FO'=0 zero. ProvideX returns Error #43: Format mask invalid.
Example In the example below, ProvideX displays 6 asterisks instead of causing an error:
SET_PARAM 'FO'=ASC("*")
PRINT 123456.78:"##0.00"
******
Description On. Uses floating point hardware automatically if it's available on your computer.
Off. ProvideX leaves 'FP' switched off if floating point hardware is not available.
Default On if your computer has a floating point processor. Otherwise it is off.
Description Assigns the default field separator value for the SEP system variable. Use the ASCII
value of your character, either as a decimal value or by using the ASC( ) Function,
p.392. You can also use the ASCII value of the character that is currently in the DLM
System Variable, p.554.
Default 'FS'=138 ($8A$, not a printable character) or 'FS'=ASC(SEP).
Example In this example, the current value in the DLM system variable (the backslash, "\")
replaces the SEP value $8A$ (i.e., CHR(138)) as the default field separator:
-:a$=sep;?hta(a$),asc(sep)
8A 138
-:set_param 'fs'=asc(dlm);? hta(sep),asc(sep)
5C 92
Description To use the F10 key to activate the menubar (the standard Windows default). In effect,
F10 acts as an Alt key.
Default Off. F10 behaves like any other function key. (ProvideX overrides the Windows
default.)
Note: When the 'FU' system parameter is set to on, 'FL' is turned off automatically.
Also: The 'FN' system parameter may override the 'FU' setting.
See Also 'FL' System Parameter, p.662, 'FN' System Parameter, p.663, and the FFN( ) Function,
p.428 (UNIX example using these parameters for case-insensitive searches).
Description Returns Error #13: File access mode invalid if the program does not
EXTRACT before all rewrites.
Default Off. Allows writes to a file with an extract of the record.
Description Sets LibHaru (extended font) implementation of *PDF*, p.738. Set to off to suppress
extended font support. LibHaru is an open-source library that enables expanded font
support when generating PDFs. This parameter is WindX aware.
Default On. LibHaru support enabled. (Access to libharu.dll is assumed.)
Description Treats all substrings of 0 zero length, starting at offset 0 zero, as valid NULL strings and
not generate Error #47.
Default Off. A null substring (e.g., X$(0,0)) results in an Error #47: Substring
reference out of string.
Description Ignores maximum record counts. No Error #2 is reported when adding records to
keyed or indexed files.
Default Off. To report Error #2: END-OF-FILE on read or File full on write
when the maximum record count is exceeded.
Description Sets the command line scan function *[ ] to scan for matches regardless of upper/ lower case.
Default On. The scan function *[ ] ignores case sensitivity for searches.
Description Remembers the current insert mode for the next input. This affects the console
command line only.
Default Off. All text mode inputs will start in overstrike mode.
Description Reset insert mode upon entry of a decimal with input to the right of the decimal during
formatted numeric entry.
Default On.
Description Assigns the control value (CTL) to be returned when input terminates on a SIZ=
clause.
Default 'IS'=5
Description Controls whether switching focus back to a ProvideX task will terminate an INVOKE
WAIT. When 'IW' is enabled, ProvideX will wait until the task launched by the
INVOKE WAIT is completed. The 'IW' parameter is WindX aware .
Default On.
Description To ignore the maximum memory setting defined by either the START Directive,
p.324, or the 'SZ'= System Parameter, p.684.
Use the 'IZ' parameter when converting an application from another language where
the values on the START directives may be incompatible with ProvideX standards.
Default Off. Memory use will be limited via START and 'SZ'= settings.
Description To set the default format type for creation by the KEYED directive, where:
'KF'=0, the KEYED directive always creates VLR or FLR-based files.
'KF'=1, the KEYED directive creates EFF formatted files with a 2GB limit.
'KF'=2, the KEYED directive creates EFF formatted files without the 2GB limit on
platforms that provide Large File Support (LFS), 64-bit addressing. Setting this
parameter on a system that does not provide LFS will automatically change to a 'KF'
value of 1.
Default 'KF'=0.
Description To switch the Keyed file I/O module to BBx emulation mode. The KEP( ) Function,
p.465, returns the key of the record prior to the next record to be read. KEY( ) functions
do not switch keys.
Default Off. See normal behaviour for the KEYED Directive, p.165.
Description Sets numeric colour code. Valid colour options for line number in break points:
0 - Black 4 - Blue
1 - Red 5 - Magenta
2 - Green 6 - Cyan
3 - Yellow 7 - White
Default 'LB'=4, Blue.
Description Sets the LST( ) Function, p.473, and the LIST Directive, p.176, to return variable
names in lower case.
Default Off. Variable names are listed in upper case.
See Also 'MC' Mixed Case, p.670.
Description Sets the LST( ) Function, p.473, and the LIST Directive, p.176, to return directive
names in lower case.
Default Off. Directives are listed in upper case.
Description Indents program statements for saves to a serial file (SAVE Directive, p.291) and for
the LIST Directive, p.176.
Default Off.
Description Sets the compiler to allow long variable names. The directive LONG_FORM, p.201
works the same as SET_PARAM 'LF'. Use either SET_PARAM -'LF' or the
SHORT_FORM Directive, p.321 to cancel.
Note: System parameters 'LF' and 'SF' have reciprocal values and are directly related.
Any change to 'SF' results in an opposite change to 'LF' and vice-versa.
Description Sets numeric colour code used for syntax errors. Valid colour options for program
line number with syntax errors:
0 - Black 4- Blue
1 - Red 5- Magenta
2 - Green 6- Cyan
3 - Yellow 7- White
Default 'LS'=1, Red.
Description Makes lock unnecessary on writing to serial files. (No Error #13 on WRITE without
lock.)
Default Off. A "sticky" parameter. ProvideX generates Error #13: File access mode
invalid if there is no lock on the first write to an open file number.
Note: File access mode is checked once, on the first write after opening. An error won't be
generated on a subsequent unlocked write if the file number is continuously open between
writes (even if the parameter is switched off between writes).
Reserved For Sage Software Canada use only - attribute included here for completeness only.
Description Suppresses leading zeros for numeric values. This was previously controlled by the
'BX' System Parameter, p.654. Printing an expression such as 1/4 normally yields a
return value of 0.25. With 'LZ' enabled, the return value would be .25.
Default Off.
Description Controls segment size in multi-segmented files. 'MB' must be set to a value to
activate the multi-segmented file feature. ProvideX calculates the approximate size
of each segment in megabytes, based on the block size of a file:
Segment size in bytes = 512 + ((bksz - 6) * bksz)
bksz above represents the block size of the file. You can use the BSZ=option when
you create the file, to override the default block size.
The following table lists the maximum number of segments allowed for a file based
on valid block sizes (1 to 31 kilobytes):
Block Size Segments Block Size Segments Block Size Segments
31K 124 30K 120 29K 116
28K 112 27K 108 26K 104
25K 100 24K 96 23K 92
22K 88 21K 84 20K 80
19K 76 18K 72 17K 68
16K 64 15K 60 14K 56
13K 52 12K 48 11K 44
10K 40 9K 36 8K 32
7K 28 6K 24 5K 20
4K 16 3K 12 2K 8
1K 4
Note: This feature is available for variable-length records (VLR) format only.
Default 'MB'=0
Description Allows mixed case for variable names and line labels in program listings; e.g.,
10 ThisIsFirst=10
20 THISISFIRST=20
LIST
10 ThisIsFirst=10
20 ThisIsFirst=20
Once 'MC' is set, the first instance of a variable will establish the case setting for all
subsequent uses. To change the case of a variable name, all references to the variable
must be removed and the program must be saved and reloaded.
Default Off. Variable names and line labels are maintained in uppercase only.
Note: The case setting is also affected by the 'LC' System Parameter, p.667.
Description Reduces or increases the multi-line size factor. This affects the amount of white space
appearing above and below multi-line text (where accents and descenters are displayed).
Note: By default, Windows creates multi-line input 50% larger than the font size to allow
for white space above and below. While the 'MF' parameter allows you to adjust this
default, we do not recommend it.
Default 'MF'=50
Description Included for completeness only. Defines the maximum amount of conventional
memory to be used as program swap space (legacy DOS systems). If using Extended
Memory, the value should be left at zero. See 'XS' Extended Memory (KB), p.693.
Default 'MS'=0
Description Allows use of a customizable message box (msgbox.gui) instead of the system message
box. For details, refer to the MSGBOX Directive, p.212.
Note: When 'MX' is set, MSGBOX commands entered in console mode or executed within
an EXECUTE command cannot be followed by any other command (as MSGBOX will
be executing a CALL without a return address).
Default On (if *ext/msgbox.gui exists), Off (if *ext/msgbox.gui does not exist).
Description Strips trailing nulls from a key; i.e., key values $00$, $0000$ and $000000$, become $$.
Default Off. No stripping occurs.
Description Invalidates statements that reference line numbers. For instance, GOTO 1050 is not
allowed. ProvideX returns Error #85: Program does not support line
numbers. A line label is required; i.e., GOTO Label_1050.
Default Off. Statements can reference line numbers. (No Error #85.).
Description Prevents intermediate rounding on division. (This has no affect on other operations,
such as multiplication.)
Default Off. Intermediate rounding is performed.
Description Included for completeness only. Prevents the swapping to extended or expanded
memory (legacy DOS systems).
Description Forces the system to commit all file updates and locks prior to OPEN directive.
Default Off. Outstanding file updates will be handled when retrieved.
Description PVX UNIX/Linux Only. Defines the maximum transmission size in bytes to be sent
to an output device before forcing an output flush. Some UNIX systems and drivers
can suffer overrun conditions if this parameter is not set.
Default 'OF'=255 on AIX systems.
Description Controls the default maximum number of Keyed buffers for files on OPEN LOAD.
Default 'OL'=25.
Description Uses old style MSK( ) function logic. MSK( ) is now compatible with the UNIX GREP
command.
Default On. See normal behaviour for the MSK( ) Function, p.482.
Description Sets the PGM( ) function to return the original program name.
Default Off. PGM( ) will return the full pathname of a program.
Description On. Treats the destination (second) parameter in the RENAME directive as containing a
fully expanded OS path for the renamed file.
Off. Standard ProvideX search rules and file-naming conventions apply to the
renamed file.
Default On. Refer to the RENAME Directive, p.278.
Description Defines the maximum number of programs to remain in program cache. For
'PC'=nnn, ProvideX will maintain the last nnn programs (subprograms) in memory,
thus reducing the time required to reload them.
The program cache is automatically flushed when dropping to a console prompt.
Also, any changes to the 'PC' setting will purge the cache and reload programs from
disk. For example, use the following to reset cached programs so that changes on
disk are reloaded:
SET_PARAM 'PC'=PRM('PC')
Note: Since the program cache setting is local to the machine, any changes to the "disk file"
will not be reflected across the network until the user initiates a new session, changes the
'PC' setting, or saves the program locally.
Description Assigns the default number of decimal places for the current session (PRECISION
range 0 to 18).
Default 'PD'=2
Description Attempts to read a file when an invalid password is supplied for a data file that has
WRITE or WRITE AND ON DATA (read-only) privileges. Refer to the PASSWORD
Directive, p.238 for more information.
Default Off. Generates an error when an invalid password is encountered.
Description Included for completeness only. Sets use of EMS page frame for work space, increasing
the available memory by 64KB (legacy DOS systems).
Default On, if EMS is available on the machine.
Description Returns the original pathname specified in the FID( ) Function, p.434.
Default Off. The expanded pathname is returned.
Note: When 'FF' is set to 0 or 3 and 'PO' is on, the FID( ) and FIB( ) functions return the
original path used when the file was opened.
See Also 'FF'= System Parameter, p.662, FIB( ) Function, p.430, and FID( ) Function, p.434.
Description On. Prompts the user to enter a password when an attempt is made to open a
passworded file without specifying a KEY= value or on a null KEY= value. Refer to
the PASSWORD Directive, p.238 for more information.
Off. No prompts for password.
Default On.
Description Sets the maximum number of files that can be recorded in the password queue. Refer
to the PASSWORD Directive, p.238 for more information.
The queue stores the filename and password for each passworded file that has been
successfully opened. All attempts to open a passworded file without specifying a
password will be verified with the queue to see if the password has been previously
supplied. If the filename appears in the queue, the password will be re-applied from
the existing entry.
Specifying a password value for a filename that already appears in the queue causes
the entry to be removed and the password to be re-verified. To reset the queue, use:
SET_PARAM 'PQ'=PRM('PQ').
Default 'PQ'=100
Description Included for completeness only. Defines the size (in KB) of the "program load" region
(legacy DOS systems). Setting this enables the swapping logic and should be set to
just larger than the largest program used by the application to a maximum of 63KB.
Default 'PS'=0
Description Converts any filenames in an OPEN statement to upper case when scanning a prefix
file for a key matching the filename. Use this to simplify SQL migrations where all
filenames must be in upper case.
Default Off. ProvideX does not convert case when scanning a prefix file for a match.
Normally, the keys in a prefix file are case-sensitive.
Description Assigns the password character to be displayed in multi-lines to mask input denoted as
a password. Use the ASCII value of your character; e.g., SET_PARAM 'PW'=42 will set
the password character to "*".
Default 'PW'=36 or 'PW'=ASC("$").
Description Stops warnings from ProvideX regarding programs larger than 64K.
Default Off. Warning will be sent when attempting to SAVE a program larger than 64K.
Description PVX Windows/WindX Only. Assigns the lowest task priority level. When an
application exceeds the value of the parameter 'WI' Windows Instruction Count,
p.690, its priority level is decremented until it reaches the value of the 'Q_'
parameter.
Default 'Q_'=2.
Note: Three parameters ('Q_', 'Q^', and 'QF') control the priority of a task, primarily to
balance the load in a client-server environment. PVXWIN32.EXE supports five levels
(range: lowest 0 to highest 4). The current priority level is stored in TCB(91). Refer to the
TCB( ) Function, p.530.
Default 'QD'=4
Description Activates an improved algorithm for scanning the key tree in Keyed and EFF files.
Default On.
Description Assists in conversions. A START command which includes the name of a program to
run at startup will only clear local variables (same as a BEGIN) and start the specified
program. ProvideX will only re-initialize on a simple START issued from the console.
Default Off. A START command to re-initialize ProvideX will close all files and clear all
variables.
See Also START Directive, p.324.
Description PVX Windows/WindX Only. Rounds data in formatted input fields (multi-lines).
When this parameter is set, data that has more than the allowed number of decimals
will be rounded when placed into a field.
Default Off. Data is truncated.
Description Controls when and how rounding will occur. Valid settings for 'RN' are as follows:
1- On any assignment
2- On any Add, Subtract
4- On any Multiply, Divide, Power, or Modulus
8- On any math function (SIN( ), COS( ), LOG( ), etc.)
64 - On all intermediate values in an expression
128 - Before any numeric data is written to file
256 - At the end of any expression
512 - Before all numeric compares
These values are additive; e.g., to set 4 + 128 + 512, use SET_PARAM 'RN'=644.
Default 'RN'=1 (on any assignment).
See Also 'RS' Round STR( ), p.680.
Default On.
Description PVX UNIX/Linux Only. Prevents a ProvideX process from extracting a record from a
file if it already has that record extracted on another channel.
Note: Under Windows, this behaviour is the standard and is unchangeable. Extracts
always block within the same process.
Default Off. Extracts are not blocked by other extracts within the same process.
Description Appends a trailing slash to the name of a subdirectory entry returned when reading
a directory.
Default Off. No trailing slash is returned with the subdirectory entry.
Description Sets the compiler to restrict variable names to a single letter or a letter followed by a
number. The SHORT_FORM Directive, p.321, can also be used to set 'SF'. Use either
SET_PARAM -'SF' or the LONG_FORM Directive, p.201, to cancel 'SF'.
Note: System parameters 'LF' and 'SF' have reciprocal values and are directly related.
Any change to 'SF' results in an opposite change to 'LF' and vice-versa.
Default Off. The compiler allows long variable names. Spaces are required between
directives and variable names.
Description Shrinks Keyed files when executing the directives PURGE or REFILE. ProvideX
returns the freed space to the OS.
Default Off. By default, ProvideX simply re-initializes the file header information when it
encounters a PURGE/REFILE directive for a data file (Keyed or Direct). This means
that if you accidentally PURGE/REFILE such a data file, the ProvideX Keyed/Direct
file key reconstruction utility (*UFAR) can salvage most, if not all, of the information
originally stored in the file.
See Also PURGE Directive, p.259,
REFILE Directive, p.274.
Description Assigns the number of command input lines to preserve internally. Range: 4 to 100.
Default 'SL'=32
Description Sets the ProvideX default printer to serial printer mode. For overstrike data, overlay
characters will print on top of existing characters at their positions on the print line.
Default Off. Sets the printer to line printer mode. For overstrike data, overlay characters
replace existing characters on the print line.
Description Attempts to optimize performance when reading fixed length record files over
slower networks by reading smaller portions of the data record rather than the
defined record size. If the first "short read" is unable to read the entire record then a
second read is performed to retrieve the remaining portion of the record.
Note: This is used to improve performance in peer-to-peer networks where records are
not filled to their maximum size.
Description Checks modified programs for the logical integrity of some decision/loop structures
and warns about any errors before saving (SAVE Directive, p.291).
Default Off.
Default 'SW'=1
Description Defines the maximum memory (in kilobytes) that the session is allowed to use. This
value can also be changed via the START Directive, p.324.
Default 'SZ'=32000. For older Windows versions of ProvideX, this value is 1024 or the
maximum memory available, whichever is less. For older UNIX/Linux versions, this
value is 512.
Note: Under Windows, the maximum setting is 32000. Under UNIX / Linux the
limit has been increased from 512 to 32000. If the 'IZ' parameter is set, the 'SZ' parameter is
ignored; see 'IZ'=, p.666.
Description Defines the amount of data (in Kilobytes) that will be sent to the thin-client before
forcing turbo mode acknowledgement. This has been shown to help slower speed
connections; e.g., when printing across WANs.
Default 'TA'=0. No forced acknowledgement.
See Also 'TU' System Parameter, p.687.
Description Calculates toolbar width/coordinates based on the number of columns in the window.
The toolbar size will be the actual number of columns found in the window, which is
equal to the value returned by MXC(0).
Default Off. Toolbar width and coordinates are calculated based on 80 columns, regardless
of the number of columns in the window.
Description Assigns the fill colour for the "Tip" window. If the colour code is in the range from 0
to 7 then the respective colour is used as fill. If the colour code is in the range from 8
to15, then 50% of the colour is used. Supported options include:
0 - Current 8 - Dark Gray
1 - Light Red 9 - Dark Red
2 - Light Green 10 - Dark green
3 - Light Yellow 11 - Dark Yellow
4 - Light Blue 12 - Dark Blue
5 - Light Magenta 13 - Dark Magenta
6 - Light Cyan 14 - Dark Cyan
7 - White 15 - Gray
Default 'TC'=0. Current Windows default tip colour, specified in the user's desktop. This will
match other Windows applications on the user's system.
Note: In earlier versions, 0 was the colour code for Black and the default setting was 11 for
Yellow.
Description Assigns the thousands separator/character for use in formatted numeric data IO.
Use the ASCII value of the character. For WindX environments, this parameter must
be set on both the client and the server.In order for this format to be applied in
numeric masking, the mask must be identified as numeric using the # character (see
Numeric Format Masks, p.808).
Note: 'TH' is used if I/O is formatted in INPUT, OBTAIN, PRINT and the STR( ) function
(and ignored for unformatted I/O). It is always ignored by the NUM( ) function and
when using WRITE, READ, FIND or EXTRACT directives in converting numeric data.
Description Sets the LIKE Operator to use a simplified pattern match which emulates the behaviour
of LIKE in Thoroughbred for conversions from Thoroughbred. This pattern matching is:
• mask character: the complete string on the left must match
• character '*' in the mask stands for any number of characters
• character '?' in the mask stands for any single character
Default Off. LIKE uses the same pattern matching as MSK( ), p.482.
Example "ABCDEF" matches "*DEF", "ABC???", "*CD*" but not "ABC" or "?".
Description Strips trailing nulls from the end of READ RECORDs. This parameter only applies to
FLR-formatted (fixed-length record) KEYED files.
Default Off. Trailing nulls are not stripped.
Description Sets trace output prefixed by the current time (in seconds). Parameter codes allow
control over where a line wraps based on the record size of the output file, output of the
full program path name, and output of the line number only (no code). Valid settings for
'TT' are as follows:
0- No output
1- Trace line prefixed with time value followed by a space.
2- Trace line prefixed with full program path. Delimiter becomes pipe, “|”
4- Only the statement number is output (Program line is suppressed).
8- Trace line prefixed with stack depth (Parameter 'B0' adjusted)
These values are additive; e.g., to set 2 and 4, use SET_PARAM 'TT'=2+4.
Default 'TT'=0. No output.
Description Gains efficiency of throughput by not requiring the thin-client to acknowledge messages
for directives/functions that have no return value (e.g., a WRITE for a graphical control).
This improves speed in NOMADS.
Note: This parameter is set on the host/server. Also, when 'TU' is on, you lose error
detection capability at the host end — errors are reported locally (e.g., on the WindX
client). Trouble-shoot by changing the application logic or by turning 'TU' off.
Default Off. Each tokenized message sent by the server to the client is acknowledged and
errors are reported to your server, guaranteeing that your application and thin-client
are fully synchronized (but at some cost to overall transmission speed).
See Also 'TA'= System Parameter, p.685.
Description Sets BBx-style string templates that use the (*) format to default to the line feed character
($0A$) as a separator rather than $8A$.
Default Off. BBx-style string templates default to $8A$ as the separator.
Description Included for completeness only. Sets ProvideX to use Upper Memory Blocks to
increase memory space (legacy DOS systems).
Default On, if UMBs exist on the machine.
Description Holds the cursor at column 80 until subsequent print data follows. This resolves an issue
with wrapping at column 80 on VT100-type terminals such as a Linux console.
Default Off. Assumes terminal wraps when printing at column 80.
Description Included for completeness only. Sets all screen I/O to use direct memory addressing
(legacy DOS systems).
Default Off. Screen I/O uses BIOS calls
Description Assigns the average character width for PRINT @(x,y) positioning with proportional
fonts. Use the ASCII value of your character.
Default 'VP'=48 or 'VP'=ASC("0") for zero.
Description Verifies all data file reads by re-reading and comparing. The values set in 'VR' define
the number of retries before a data read error is generated.
Note: 'VR' can be helpful in tracking down hardware-related data corruption problems.
(There is some impact on system performance.) TCB( ) returns the following values for this
parameter:
TCB(63)- Number of reads verified
TCB(65)- Number of reads mis-compares.
Default 'VR'=0
See Also TCB( ) Return Task Information, p.530.
Description Verifies all data file writes by re-reading after a write to check data integrity. The
value set in 'VW' defines the number of retries before a data write error is generated.
Note: 'VW' can be helpful in tracking down hardware-related data corruption problems.
(There is some impact on system performance.) TCB( ) returns the following values for this
parameter:
TCB(63)- Number of writes verified
TCB(65)- Number of writes mis-compares.
Default 'VW'=0
See Also TCB( ) Return Task Information, p.530.
Description Defers all file writes until nnn updates have been done, the file is closed, or an
INPUT is requested from channel #0 (terminal). The ‘WD' parameter only affects
Keyed file I/O. Performance can be improved in single user environments if the 'WD'
parameter is set high.
Default 'WD'=10000 in a single user environment under Windows; otherwise, 'WD'=100.
Example SET_PARAM 'WD'=10000
Description PVX Windows/WindX Only. Forces an update of the Windows screen whenever a
change is made by the program.
Default Off. The screen is updated on INPUT, WAIT, or after processing the number of
instructions set by the 'WI' parameter.
Description All Platforms Except UNIX. Defines the number of tenths of a second to delay between
retries in locking file headers.
Default 'WH'=0 (zero tenths of second).
Description PVX Windows/WindX Only. Sets the number of instructions to be executed before
passing control to the operating system.
Note: The overall number of instructions between priority level switching is based on an
exponential formula using the values of the 'WI' and 'QF' parameters. See system
parameters 'Q_', 'Q^' and 'QF' Task Priorities, p.678, which control task priority.
Default 'WI'=1000
See Also TCB( ) Return Task Information, p.530; i.e., TCB(91).
Description Prevents 'WINDOW' and 'DIALOGUE' boxes from being automatically dropped when
you use a BEGIN (or END in Command mode) or a CLOSE.
Default Off.
Description PVX UNIX/Linux Only. Temporarily blocks all other access for both READ and WRITE
directives to a Keyed data file. (For that split second, only one access will be allowed.).
Default Off. ProvideX allows multiple simultaneous READ accesses to a Keyed file but only
one WRITE access.
See Also WRITE Add/Update Data in File, p.379 and READ Read Data from File, p.267.
Description Determines whether or not to wait until a child process completes. When 'WP' is on, and
a pipe is closed, ProvideX will wait until the child process has terminated.
Note: If 'WP' is on, and the operation that the child was started for does not complete, then
ProvideX will not return. A Ctrl - Break may terminate the child, depending on the child's
processing of a BREAK.
When 'WP' is off, and a pipe is closed, ProvideX will not wait for the child to complete.
This canresult in a child process that has not had its exit status checked (shown as
"defunct" ). ProvideX will automatically check and clear out these defunct processes
whenever A) it opens another pipe, B) a WAIT directive is encountered, or C) the current
ProvideX session is terminated.
Default Off.
Description Assigns the number of retries ProvideX makes internally for busy records/ files. The
retries are performed at one second intervals.
Default 'WT'=2
Description Sets the minimum packet size (in bytes) for compression during WindX transmission.
Values can range from 0 to 32767. Setting the value to 0 disables ZLib compression
completely. This parameter must be set on the host/server.
Default 'WZ'=512
Description Sets ProvideX to ignore TCP write errors to WindX. This allows a process to continue
running and outputting to WindX, even while the WindX client is no longer connected.
The process should continue until a READ/INPUT request; then, the error is reported
and ProvideX terminates
Default Off. WindX generates the error and cancels the process.
Description Sets extended file mode where the channels range from 1-32767 for local files and
32768-65000 for global files. Channel 0 zero is the console or terminal.
Default Off. Channels 1 to 63 are used for local files and 64 to 127 are used for global files.
Note: Before you turn the 'XF' parameter off, make sure that none of your currently open
files have extended file numbers (which are inaccessible when you SET_PARAM -'XF').
Description Allows extracted records to be read by other ProvideX processes. The blocking of the
extracted record is limited to EXTRACT, WRITE and REMOVE.
Default Off. The EXTRACT of a record blocks all other file I/O on that record, including READ.
See Also EXTRACT Read and Lock Data, p.125 and WRITE Add/Update Data in File, p.379.
Description Included for completeness only. Assigns the amount of extended memory used as
program swap space (legacy DOS systems). If the value exceeds the available extended
memory, it will be adjusted to the maximum allowed.
Default 'XS'=0
Description On. To terminate ProvideX and return to the OS when your application returns to
Command mode (on end of program, a detected error, or an Escape).
Off. To return and stay in Command mode on end of program, error, or Escape.
Default On, if there is a lead program on the startup ProvideX command. Otherwise, it is off.
Note: If the ESCAPE directive is used in a program, this system parameter will be
automatically reset to prevent session termination.
Description Sage MAS 90 Only. Converts incoming and outgoing dates for an ODBC connection to
Sage MAS 90 format automatically.
Default Off. No automatic conversion is performed.
Description Resets to the original method for handling the decimal point and the thousands
separator prior to ProvideX 4.12.
Default Off. See the 'DP'= System Parameter, p.658, and the 'TH'= System Parameter,
p.686, for the current method of handling these values.
Description To use legacy descending key logic. This is included in ProvideX only to help
programmers who relied on the legacy logic's incorrect behaviour. Issue on
READ(c,KEY=) for primary key with descending segments (resolved Version 4.11).
Default Off. ProvideX standard logic is used.
Description Displays SQL statements to assist in the troubleshooting of external database related
problems. If using the WindX client, then the SQL statement will appear on the client.
Valid values are as follows:
0 - Off. Hidden. Default.
1 - Message box appears with generated SQL statement.
2 - SQL statement is sent to program trace window (if open).
Description Will not flag lines with errors when saving to serial files. Enabling '!S' removes the
question mark immediately following the line number on statements with errors.
Default Off. Errors are flagged.
Description Accepts either 'DP' or the true decimal point character (".") as a decimal point for numeric
data input.
Default Off. Hidden.
Description PVX Windows/WindX Only. When enabled, ProvideX will quietly process any
Windows termination signals received from the operating system as if it were running as
a background service.
Default Off.
Description Forces ProvideX and WindX to maintain keyboard synchronization in order to prevent
type-ahead buffer loss.
Default Off.
Note: Users of *NTHost/*NTSlave will need to upgrade both the server side and WindX
clients to properly utilize the WindX type ahead improvements controlled with '!W'.
Also: Only set this parameter on the server side of a client-server connection.
Description Map READ and WRITE requests to channel 0 internally to INPUT and PRINT
respectively (to assist with BBx conversion).
Default Off.
Overview
Overview
Note: In this reference, some properties are denoted with $ dollar signs to indicate that
they represent string values; e.g., 'Msg$ or 'Tip$.
For a complete list of graphical control objects and their properties, see Graphical
Control Objects, p.699. The Properties List, p.705, provides a complete
alphabetically- arranged list of valid property names and their definitions. Special
property groupings (for extended GUI functionality) are described in the section
Compound Properties, p.724.
Generally, numeric properties are type insensitive; i.e., a property such as 'Line
returns (or receives) a number. If desired, you can access the same value using the
property 'Line$. This is also true for string properties, assuming that they only
return numeric values.
Some properties return different values based on the type of reference you make. For
example, most colour properties return a text description of the RGB colour when
accessed as a string, or a 24-bit colour number when accessed as a numeric.
ProvideX also supports objects that are external to ProvideX this chapter does not deal
with the properties (and methods) that apply to them. COM and OOP objects/controls
are described under the Apostrophe Operator, p.817.
This section provides cross-references to corresponding directives and lists all of the
properties used to define and manipulate each of the specific object types. The list
supplied immediately below each object heading is linked to descriptions under the
full Properties List, p.705.
Properties that define extended attributes are shown in italics. They represent a
category of attributes that cannot be accessed within a directive (via FMT= or
OPT=); for example, the majority of cell attributes for grids are defined/set using
properties. See also Compound Properties, p.724.
BUTTON
BackColour$ Focus Left SignalOnly _PropList$
BitmapPosition Font$ Line Text$ _PropSep$
Col Height Lines TextColour$ _PropValues$
Cols HoverColour$ MenuCtl Tip$
CtlName$ ImageCount Msg$ Top
Enabled hWnd OnFocusCtl Visible
Eom$ Key$ Parent Width
A button object is usually designed to send a signal to the application when selected
by a mouse click. The signal typically indicates that the user wants to end a function
or initiate a new function. For more information on BUTTON controls, refer to the
BUTTON Directive, p.34.
CHART
AutoScale FaceColourLeft$ MarginBottom RangeMax Visible
BackColour$ Fmt$ MarginLeft RangeMin Width
Bitmap$ Font$ MarginRight RangeText$ XAxisLocation$
BitmapPosition$ Footer$ Margins$ SelectIndex XAxisTitle$
Col Height MarginTop Sep$ YAxisLocation$
Cols hWnd MenuCtl SepLoad$ YAxisTitle$
CurrentPoint IndexMode NumPoints TextColour$ YAxisLocation$
CurrentSet LabelLocation$ NumSets Tip$ ZAxisTitle$
CtlName$ Left Parent Title1$ _PropList$
Enabled LegendLocation$ PointText$ Title2$ _PropSep$
Eom$ LegendText$ Proportions2M Top _PropValues$
FaceColourBack$ Line ProportionDW Value
FaceColourBottom$ Lines ProportionHW Value$
The chart control is used to create illustrations for an application. A chart is usually
designed to be a display only object that requires no user interaction. For more
information on this control, refer to the CHART Directive, p.43. For information on
applying properties to individual chart elements (labels, legends), see Chart Label
Reference, p.729.
CHECK_BOX
BackColour$ Focus Left SignalOnly Value$
BitmapPosition Font$ Line Tbl$ Visible
Col Height Lines Text$ Width
Cols HoverColour$ MenuCtl TextColour$ _PropList$
CtlName$ ImageCount Msg$ Tip$ _PropSep$
Enabled hWnd OnFocusCtl Top _PropValues$
Eom$ Key$ Parent Value
A check box object is designed to be toggled between two states: ON to check the
option or OFF to uncheck it. For more information on the CHECK_BOX control, refer
to the CHECK_BOX Directive, p.47.
DROP_BOX
Auto Eom$ Key$ ScrollWheel Top
BackColour$ Focus Left Sep$ Value
Col Font$ Line SepLoad$ Value$
Cols Height Lines SignalOnExit Visible
CurrentItem hWnd MenuCtl Tbl$ Width
CtlName$ Item Msg$ TblWidth _PropList$
DroppedOn ItemCount OnFocusCtl TextColour$ _PropSep$
Enabled ItemText$ Parent Tip$ _PropValues$
This control is used to provide a drop-down list of elements from which users can
make a selection. A drop box takes a smaller amount of space on the screen than a
comparable list box. For more information on this control, refer to the DROP_BOX
Directive, p.95.
GRID
Align Column$ hWnd OverlapEnabled SortCaseSensitive
Align$ ColumnNames$ ImpliedDecimal Parent SortOnHdrClick
Auto ColumnPixels InsDelEnabled Resizable SortColFmt$
AutoSequence ColumnSizeLock JoinColumns RightBorder SortStyle
AutoTrack ColumnsWide JoinRows Row SwapEnabled
BackColour$ ColumnWidth Key$ RowData$ TabMode
Bitmap$ CurrentColumn Left RowHeight Text$
BottomBorder CurrentCellColour$ LeftBorder RowHiLight TextColour$
BottomLeftTick$ CurrentRow Len RowPixels TickPerUnit
CellFormat$ CtlName$ Line RowsHigh TickPixels
CellHiLight DraggedColumn Lines SelectColumn Tip$
CellImpliedDecimal DraggedRow LoadIOLIST$ SelectCount Top
CellLeft DroppedOnColumn LoadList$ SelectIndex TopBorder
CellTag$ DroppedOnRow Lock SelectRow TopLeftTick$
CellTbl Enabled LockColumns SelectText$ TrackColour$
CellTblWidth EnterMode LockRows SelectValue$ Uppercase
CellTip$ Eom$ MenuColumn ScrollWheel Value$
CellTop ExcelStyle MenuCtl Sep$ Value
CellType$ FillColour$ MenuRow SepLoad$ Visible
CellTypeList$ Fmt$ Msg$ SignalOnExit Width
Col Focus MultiSelect SkipLockedCells _PropList$
Cols Font$ Nul$ Sort _PropSep$
Column Height OnFocusCtl Sort$ _PropValues$
The GRID control is used to create a table of cells in columns and rows; i.e., a
spreadsheet input format. For more information, refer to the GRID Directive, p.142.
See also Grid Property Access, p.729, Multiple Selections, p.726, Drag and Drop,
p.727, and Loading/Accessing by Row, p.728.
LIST_BOX
Auto Fmt$ ItemText$ SelectCount Value
BackColour$ Focus Key$ SelectIndex Value$
BackHilight1$ Font$ Left SelectItem Visible
BackHilight2$ Height Line Sep$ Width
Col HoverColour$ Lines SepLoad$ _PropList$
Cols hWnd MenuCtl SignalOnExit _PropSep$
CurrentItem Item MouseOver Tbl$ _PropValues$
CtlName$ ItemCount Msg$ TblWidth
DroppedOn ItemNeededCtl OnFocusCtl TextColour$
Enabled ItemNeededFrom Parent Tip$
Eom$ ItemNeededTo ScrollWheel Top
A list box displays a list of elements from which the users can make a selection.
ProvideX supports different list box types: Standard and Formatted (see the LIST_BOX
Directive, p.178), LIST_VIEW (described below), and TREE_VIEW (described below).
See also Multiple Selections, p.726 and Load on Demand, p.725.
LIST_VIEW
Auto DroppedOn ItemNeededFrom ScrollWheel Tip$
BackColour$ Enabled ItemNeededTo SelectCount Top
BackHilight1$ Eom$ ItemText$ SelectIndex Value
BackHilight2$ Fmt$ Key$ SelectItem Value$
Col Focus Left Sep$ Visible
Cols Font$ Line SepLoad$ Width
Column Height Lines SignalOnExit _PropList$
ColumnClicked HoverColour$ MenuCtl Sort _PropSep$
ColumnsWide hWnd MouseOver SortOnHdrClick _PropValues$
ColumnWidth Item Msg$ Tbl$
CurrentItem ItemCount OnFocusCtl TblWidth
CtlName$ ItemNeededCtl Parent TextColour$
This control operates like a standard list box but provides for columnar lists with
optional bitmaps. The format appears similar to the right-side pane of “classic”
Windows Explorer. Details on the list view control are provided under the LIST_BOX
Directive, p.189. See also Load on Demand, p.725, and Multiple Selections, p.726.
MULTI_LINE
Auto Focus Lines ScrollWheel Value
AutoComplete$ Font$ Lock SelectLength Value$
BackColour$ GenerateScrollEom MenuCtl SelectOffset Visible
Calendar$ Height Msg$ SelectText$ Width
Col hWnd Nul$ Sep$ _PropList$
Cols ImpliedDecimal OnFocusCtl SignalOnExit _PropSep$
CtlName$ Key$ OnFocusCols TextColour$ _PropValues$
Enabled Left OnFocusLines Tip$
Eom$ Len Parent Top
Fmt$ Line Scroll Uppercase
Multi-lines provide a standard input field to display and enter one or more lines of
text. For more information on the MULTI_LINE control, refer to the MULTI_LINE
Directive, p.214.
RADIO_BUTTON
BackColour$ Focus Key$ Parent Value
BitmapPosition Font$ Left SignalOnly Value$
Col Height Line Tbl$ Visible
Cols HoverColour$ Lines Text$ Width
CtlName$ hWnd MenuCtl TextColour$ _PropList$
Enabled ImageCount Msg$ Tip$ _PropSep$
Eom$ Id OnFocusCtl Top _PropValues$
Radio buttons are used to control a variable between a series of preset states, offering
one choice from a group of options. When one radio button is selected, it becomes
activated (on) and all other related radio buttons are automatically reset (off). For
more information on the RADIO_BUTTON control, refer to the RADIO_BUTTON
Directive, p.261
TREE_VIEW
Auto Eom$ Key$ ScrollWheel Tip$
AutoState Expanded Left SelectCount Top
BackColour$ Fmt$ Line SelectedChildren Value
CascadeState Focus LineColour$ SelectIndex Value$
Children Font$ Lines SelectItem Visible
Col Height MenuCtl SelectStateMask Width
Cols hWnd MouseOver Sep$ _PropList$
CurrentItem Item Msg$ SepLoad$ _PropSep$
CtlName$ ItemCount NotifyExpand SignalOnExit _PropValues$
DroppedOn ItemState OnFocusCtl Sort
Edit ItemTag$ Parent StateBitmaps$
Enabled ItemText$ PrefixData TextColour$
This control operates like a standard list box but appears as a tree-like structure with
optional bitmaps. Each entry in a tree view consists of a series of strings or values
separated by a delimiter like a directory structure. Details on the tree view list box
control are provided under the LIST_BOX Directive, p.192. See also State Indicators
and Multiple Selections, p.726.
TRISTATE_BOX
BackColour$ Focus Left SignalOnly Value$
BitmapPosition Font$ Line Tbl$ Visible
Col Height Lines Text$ Width
Cols HoverColour$ MenuCtl TextColour$ _PropList$
CtlName$ hWnd Msg$ Tip$ _PropSep$
Enabled ImageCount OnFocusCtl Top _PropValues$
Eom$ Key$ Parent Value
A tristate box is a check box in which the user can toggle between three states: On,
Off, and a third choice. For more information, refer to the TRISTATE_BOX Directive,
p.340.
VARDROP_BOX
Auto Font$ Line SelectText$ Visible
BackColour$ Height Lines Sep$ Width
Col hWnd MenuCtl SepLoad$ _PropList$
Cols Item Msg$ SignalOnExit _PropSep$
CtlName$ ItemCount OnFocusCtl TextColour$ _PropValues$
DroppedOn ItemText$ Parent Tip$
Enabled Key$ ScrollWheel Top
Eom$ Left SelectLength Value
Focus Len SelectOffset Value$
The VARDROP_BOX control operates like a standard drop box but will allow
variable input. That is, the user can select any element from a list of items associated
with the drop box but can also enter any other value. For more information on this
control, refer to the VARDROP_BOX Directive, p.350.
VARLIST_BOX
Auto Font$ Line SelectText$ Visible
BackColour$ Height Lines Sep$ Width
Col hWnd MenuCtl SepLoad$ _PropList$
Cols Item Msg$ SignalOnExit _PropSep$
CtlName$ ItemCount OnFocusCtl TextColour$ _PropValues$
DroppedOn ItemText$ Parent Tip$
Enabled Key$ ScrollWheel Top
Eom$ Left SelectLength Value
Focus Len SelectOffset Value$
The VARLIST_BOX control operates like a standard list box but will allow variable
input. That is, the user can select any element from a list of items associated with the
list box but can also enter any other value. For more information on this control,
refer to the VARLIST_BOX Directive, p.356.
Properties List
List ofProperties
The various properties available for defining ProvideX common control objects are
described below. Each property name cross-references to one or more control
object(s), which are described in the section Graphical Control Objects, p.699.
Align GRID
Text alignment. Valid numeric values include 1 (top-right), 2 (top-centre), 3 (top-left), 4
(right), 5 (centre), 6 (left), 7 (bottom-right), 8 (bottom-centre), 9 (bottom-left). Default: 4.
Align$ GRID
Text alignment. Valid text values include "TR" (top-right), "TC" (top-centre), "TL"
(top-left), "R" (right), "C" (centre), "L" (left), BR (bottom-right), "BC"
(bottom-centre), "BL" (bottom-left). Default: "TL".
AutoComplete$ MULTI_LINE
Automatic Completion of User Entries. For parameters, see AutoComplete, p.217.
AutoCTL MULTI_LINE
Generates ctl_id to signal Auto-Complete. ctl_id to be generated by a MULTI_LINE
to signal that the list of entries for the AutoComplete dropbox is to be loaded via the
AutoValue$ property. .
AutoScale CHART
Auto-scaling for text elements. 0=Off; 1=On. When set to On, chart text elements
(labels, legends) are automatically resized to fit the given area. Default: 1. For more
information on applying this property, see Chart Label Reference, p.729.
AutoSequence GRID
Automatic row sequence. Assigns a column number that contains a row sequence
number. ProvideX automatically fills in values of the cells with the appropriate row
number. When rows are changed, the column containing the sequence number is
automatically updated. (Changing this property forces full redraw of the grid). Default: 0.
AutoState TREE_VIEW
Control automatic toggling of states. See State Indicators, p.727.
AutoTrack GRID
Automatic Scrolling Control. Assigns horizontal-vertical scrolling modes normal (N),
scrolltracking (S), and joystick (J) . Codes include: 0=N-N; 1=N-S; 2=S-N; 3=S-S; 4=N-J;
5=S-J . Default: 0. See Scroll Modes under the GRID Directive, p.146.
AutoValue$ MULTI_LINE
List of entries to be loaded into auto-complete dropbox. See AutoCTL.
BitmapPosition$ CHART
Bitmap position/appearance of chart. Predefined positions include: TOPLEFT, LEFT,
BOTTOMLEFT, TOPRIGHT, RIGHT, BOTTOMRIGHT. These preserve bitmap size and
proportions. Use STRETCH parameter to force the bitmap to be stretched within the
chart's window. The TILE paramter creates a "tile" effect multiplying the original bitmap
to cover the entire chart's window. Default: "TOPLEFT".
A custom position may be defined using syntax: "x:y:column:line". With this syntax,
the bitmap is positioned within the given rectangle. Proportions and the size of the
bitmap are altered to fit the rectangle.
BottomBorder GRID
Bottom border of cell (thickness): 0 to 3 pixels. Default: 0.
BottomLeftTick$ GRID
Bottom left tick. When set to a colour, this displays a tick in the bottom left corner of the
cell. Colour names are listed under Colour Properties, p.723. Default: "DEFAULT".
Calendar$ MULTI_LINE
Invoke Month Calendar Control. For parameters, see Calendar, p.218.
CascadeState TREE_VIEW
Control cascading of states. See State Indicators, p.727.
CellFormat$ GRID
Cell format mask. Default: null. See FMT= option, MULTI_LINE Directive, p.214.
CellHiLight GRID
Cell selection highlight: 0=Cell not highlighted; 1=Focus rectangle on cell; 2=Cell
highlighted (selected); 3=Cell highlighted and has focus rectangle. Default: 1.
CellImpliedDecimalGRID
Cell Implied Decimal: Controls implied decimal input on cell by cell basis.
CellLeft GRID
Cell Left Position: Relative X position for cell.
CellTag$ GRID
Maintain hidden tag string on cell. This tag can hold internal user-defined
information about the cell.
CellTbl$ GRID
Translation table: Returns table of multi-character values representing selections.
CellTblWidth GRID
Translation table width: Sets length of each item in the 'CellTbl property. Positive
values only. Default is 1. Zero indicates that 'CellTbl$ contains a delimited string,
with the last character being the delimiter. Setting a translation table on column
default (i.e., entire column) or on an individual cell in the column is not supported.
CellTip$ GRID
Tip for Cell: Tip message.
CellTop GRID
Cell Top Position: Relative Y position for cell.
CellType$ GRID
Grid cell type. For a list of available cell type values, see Cell Types under the GRID
Directive, p.145. Default: "Normal".
CellTypeList$ GRID
List of supported cell types (described above). Delimited list where last character is
delimiter.
Children TREE_VIEW
Number of direct descendant children for current item set by 'Item.
CurrentColumn GRID
Current column with focus.
CurrentSet CHART
Current dataset. Default: 1 (0, if no data).
DraggedColumn GRID
Column number dragged from. This indicates the column number (cell) where dragging
started. Default: 0.See Drag and Drop, p.727.
DraggedRow GRID
Row number dragged from. This indicates the row number (cell) where dragging
started. Default: 0.See Drag and Drop, p.727.
DroppedOnColumn GRID
Column number where dropped. This indicates the column number (cell) where the
mouse was released/items dropped. See Drag and Drop, p.727.
DroppedOnRow GRID
Row number where dropped. This indicates the row number (cell) where the mouse is
released/items dropped. See Drag and Drop, p.727.
Edit TREE_VIEW
Control direct editing by user. This enables the automatic editing of item text; i.e., the
user can double click on an item to change its value. (See OPT="E" under Tree View,
p.192 ) 1=allow editing, 0=no editing, -1=force current item into edit mode. Default: 0.
EnterMode GRID
Set movement for Enter key: 0=Normal Processing (edits cell); 1=Move right across a
grid by column, exit on last column; 2=Move right across a grid by column, wrap to
first column; 3=Move down by row, hold on last row; 4=Move down by row, return
to column 1, hold on last row. Default: 0.
Using Shift , with these key modes reverses the direction. The TabMode value is
automatically applied to Enter if the '+E' mnemonic has been set; however, EnterMode
can be changed to a different value, if needed.
Eom$ BUTTON CHART CHECK_BOX DROP_BOX GRID LIST_BOX LIST_VIEW MULTI_LINE
RADIO_BUTTON TREE_VIEW TRISTATE_BOX VARDROP_BOX VARLIST_BOX
Last change terminator. Refer to each control directive for specific eom$ character value.
ExcelStyle GRID
Excel type grid: 0=No grid lines, 1=Lines. Default: 1.
Expanded TREE_VIEW
Node expanded: -2=Collapse selected level and all subordinates, -1/0=Collapsed,
1=Expanded, 2=Expand selected level and all sub-ordinates. Default: 0.
FaceColourBack$ CHART
Colour for background face. Valid colour names are listed under Colour Properties,
p.723. Default: "DEFAULT".
FaceColourBottom$ CHART
Colour for bottom face (3D chart). Valid colour names are listed under Colour
Properties, p.723. Default: "DEFAULT"
FaceColorBottom$ Colour for bottom face (3D chart) – US spelling. See above.
FaceColourLeft$ CHART
Colour for left face (3D chart). Valid colour names are listed under Colour
Properties, p.723. Default: "DEFAULT"
FaceColorLeft$ Colour for left face (3D chart) – US spelling. See above.
FillColour$ GRID
Fill colour. Defines the background colour for unused regions. Valid colour names
are listed under Colour Properties, p.723. Default: "DEFAULT".
Footer$ CHART
Chart footer.
GenerateScrollEom MULTI_LINE
Generate EOM value for scroll wheel actions. 0=Off, 1=On. Default: 0. This enables
generation of EOM values (scroll up=0x26, down=0x28, left=0x25, right=0x27).
Id RADIO_BUTTON
Radio button index to reference.
IndexMode CHART
Set Index Mode. This allows additional views of existing chart types to be opened; e.g., for a
2D column chart, setting IndexMode to 1 creates a clustered column chart. 1=Natural
number (1 .. n) indexing; 2=Integer (0 .. i) indexing; 3=Arbitrary x value indexing.
InsDelEnabled GRID
Cell editing keys. 0=Off, 1=On. Default: 0. This enables use of Insert to begin cell
editing and Delete for clearing the contents of a cell.
ItemState TREE_VIEW
Numeric value indicating the state of the item. 1-based, 0=No state indicator. There is a
maximum of 15 states. This property is used in conjunction with 'StateBitmaps$. See
State Indicators, p.727.
ItemTag$ TREE_VIEW
Maintain hidden tag string on item set by 'Item. This tag can hold internal
user-defined information about the item such a file key, etc.
ItemText$ DROP_BOX LIST_BOX LIST_VIEW TREE_VIEW VARDROP_BOX VARLIST_BOX
Value of the current item set by 'Item.
JoinColumns GRID
Merge two or more columns (left to right). Set this property in the column that starts
the join (leftmost) to the total number of joined columns - that number of columns
will be merged into one. For columns belonging to an existing join, this property
returns a negative integer indicating the column’s current position within the join.
JoinRows GRID
Merge two or more rows (downward). Set this property in the row that starts the join
(uppermost) to the total number of joined rows - that number of rows will be merged
into one. For rows belonging to an existing join, this property returns a negative
integer indicating the row’s current position within the join.
LabelLocation$ CHART
Custom positioning of chart labels. Use syntax: "column:line" or "AUTOMATIC" (to
set label locations to the default mode); e.g., x'LabelLocation$="10:15". For
more information on applying this property, see Chart Label Reference, p.729.
LeftBorder GRID
Left border of cell (thickness): 0 to 3 pixels. Default: 0.
LegendLocation$ CHART
Location of chart legend. Values include: TopLeft, Left, BottomLeft, TopRight,
Right, and BottomRight.
LegendText$ CHART
Legend text for a data set.
LineColour$ TREE_VIEW
Colour of connecting lines in a tree view. Valid colour names are listed under Colour
Properties, p.723. Default: "DEFAULT".
LoadIOLIST$ GRID
'LoadList$ in compiled IOList format. See Loading/Accessing by Row, p.728.
LoadList$ GRID
List of columns loaded. Lists column names in the order they appear physically in
the grid. Loading/Accessing by Row, p.728.
LockColumns GRID
Number of columns to lock into position, starting from column 1.
LockRows GRID
Number of rows to lock into position, starting from row 1.
MarginBottom CHART
Set line number for bottom chart margin.
MarginLeft CHART
Set column number for left chart margin.
MarginRight CHART
Set column number for right chart margin.
Margins$ CHART
Set all chart margins. Use syntax: "top:bottom:left:right" or "AUTOMATIC" to set
margins to the automatic (default) mode; e.g., X'MARGINS$="10:10:20:10".
MarginTop CHART
Set line number for top chart margin.
MenuColumn GRID
Column number on right-click. This property indicates the column number of a
selected cell on a right-click of the mouse. .
MenuCtl BUTTON CHART CHECK_BOX DROP_BOX GRID LIST_BOX LIST_VIEW MULTI_LINE
RADIO_BUTTON TREE_VIEW TRISTATE_BOX VARDROP_BOX VARLIST_BOX
CTL value on right-click. This property reports/sets the CTL value to generate when
an object is selected on a right-click of the mouse.
MenuRow GRID
Row number on right-click. This property indicates the row number of a selected cell
on a right-click of the mouse.
MouseOver LIST_BOX LIST_VIEW TREE_VIEW
Item number on mouse-over. This property returns the item number of an object
when the mouse pointer is over it. If the mouse is not over an object, -1 is returned. 0
is returned if the cursor is over an area in the control with no data.
MultiSelect GRID
Select multiple cells: 1=On; 0=Off. Default: 1.
NotifyExpand TREE_VIEW
Detect expand/collapse requests. When set to non-zero value, this causes a tree view
expand/collapse to generate an event with EOM code "+" (expand) or "-" (collapse).
NumPoints CHART
Largest number of data points within data set.
NumSets CHART
Total number of data sets.
OnFocusCols MULTI_LINE
On focus, resize columns. Returns to defined size when focus leaves. Assign 0 to reset.
OnFocusLines MULTI_LINE
On focus, resize lines. Returns to defined size when focus leaves. Assign 0 to reset.
OnFocusCtl BUTTON CHECK_BOX DROP_BOX GRID LIST_BOX LIST_VIEW MULTI_LINE
RADIO_BUTTON TREE_VIEW TRISTATE_BOX VARDROP_BOX VARLIST_BOX
On focus CTL event. 0 is returned if no on focus CTL value is set up for the control.
OverlapEnabled GRID
Allow cells to overlap: 1=Yes, 0=No. Default: 1.
PointText$ CHART
Point label values. Single string of point label values where last character is delimiter.
PrefixData TREE_VIEW
Control prefix on data loaded into tree view. 0=No prefix on the data - data has
bitmap option off; 1=Data loaded in the tree view can be prefixed with curly braces
containing a bitmap, state value, and tag value (separated with semi-colons) - data
has bitmap option on; 2=Returns same prefix with curly braces when data is read,
and can be supplied when the data is written (as above).
Proportions2M CHART
Proportions to margins. 0=Off; 1=On. Sets the chart to the variable-proportion mode,
which means that it is proportional to the current height-to-width ratio of the
chart-window that contains the chart. Default: 0.
ProportionDW CHART
Depth to width. Sets percentage of chart-depth to chart-width for altering depth
proportions of three-dimensional charts. Assigning a 0 zero forces default values
according to chart type. Default is ProportionDW=100 for pie chart,
ProportionDW=50 for other chart types.
ProportionHW CHART
Height to width. Sets percentage of chart-height to chart-width for altering
proportions of two-dimensional charts. Assigning a 0 zero forces default values
according to chart type. Default is ProportionHW=5 for pie charts,
ProportionHW=100 for other chart types.
RangeMax CHART
Set ceiling value of the Y-axis. The chart view will be adjusted according to
RangeMin and RangeMax values.
RangeMin CHART
Set floor value of the Y-axis. The chart view will be adjusted according to
RangeMin and RangeMax values.
RangeText$ CHART
Text of custom label for Stack Chart (one point per dataset). Labels are placed on the right
side. Labels must be added sequentially, starting from 1, up to the number of sets; e.g.,
X'CURRENTSET=1, X'CURRENTPOINT=1, X'RANGETEXT$="Label One".
Resizable GRID
Enable grid resize by user: 0=Neither row or columns are resizable; 1=Both columns
and rows are resizable; 2=Columns are resizable, rows are not; 3=Rows are resizable,
columns are not. Default: 1.
RightBorder GRID
Right border of cell (thickness): 0 to 3 pixels.
Row GRID
Grid row reference.
RowData$ GRID
Row data based on. ’LoadList$. See Loading/Accessing by Row, p.728.
RowHeight GRID
Height of current row in lines.
RowHiLight GRID
Row selection highlight: 1=Row Highlight; 0=Cell Highlight. This enables selection
of a full row rather than limited to cells. Only locked cells are highlighted. One side
effect is that when the cells are locked the grid becomes a fancy list view.
RowPixels GRID
Height of row in pixels.
RowsHigh GRID
Number of rows defined in Grid. If a grid's dimensions have been changed using this
property, the default settings must be re-set.
Scroll MULTI_LINE
Set scroll bar types. 0=No scroll bars, 1=Vertical scroll bars, 2=Horizontial scroll
bars, 3=Both scroll bars.
ScrollWheel DROP_BOX GRID H_SCROLLBAR LIST_BOX LIST_VIEW MULTI_LINE TREE_VIEW
V_SCROLLBAR VARDROP_BOX VARLIST_BOX
Set mouse scroll wheel support. 0=Scroll wheel support (all events go to parent
window), 1=Scroll only if the control has focus (mouse can hover on or off control)
2=Scroll only if the control has focus (mouse must be hovered over control), 3=If
control does not have focus, then scroll when mouse hovers over this control
(otherwise, same as 1), 4=If control does not have focus, then scroll when mouse
hovers over this control (otherwise, same as 2).
SelectColumn GRID
Column number of selected cell. (Read Only) See Multiple Selections, p.726.
SelectedChildren TREE_VIEW
Number Of Child Items. Used in conjunction with 'SelectStateMask to return the
number of child items with the desired state. (Children being entries on the tree that
have no sub-ordinates). See Multiple Selections, p.726.
SelectRow GRID
Row number of selected cell. (Read Only) See Multiple Selections, p.726.
SelectStateMask TREE_VIEW
State filter to apply. See State Indicators, p.727.
SelectValue$ GRID
Value within selected field. Requires setting the 'SelectIndex property. See Multiple
Selections, p.726.
SkipLockedCells GRID
Skip over locked cells: 1=On; 0=Off. Default: 1.
Sort$ GRID
Sort by Column Name. This sets a column name (inside quotes) to sort by. A minus
sign indicates descending order; e.g., x'Sort$ = "- col_name". (Locked rows
are included in the sort.)
SortCaseSensitive GRID
Sort With Case Sensitivity. 1=On; 0=Off. Default: 1.
SortColFmt$ GRID
Sort by Date Format. Controls format for sorting columns based on date values
rather than standard numeric/string data. Year, Month and Day code combinations of
1 to 3 characters. (e.g., Y, MY, DMY, MDY, YMD ...) Case insensitive. Use in
conjunction with 'Column to determine where date sorting will be applied.
SortStyle GRID
Sort without Nulls. Determines if cells with null values are to included in the sort.
Sortstyle values indicate the following: 0=Null values are sorted; 1=Null values are
excluded and cells will remain at the bottom of the grid (Excel-like style).
StateBitmaps$ TREE_VIEW
List of images used to display states. Separated by vertical bars; e.g.,
"!Stop|!Print". A maximum of 15 images can be applied to this property. See
State Indicators, p.727.
SwapEnabled GRID
Column swap enabled: 1=Yes, 0=No. Default: 0.
TabMode GRID
Movement setting for Tab key: 0=Normal Processing (exits grid); 1=Move right
across a grid by column, exit on last column; 2=Move right across a grid by column,
wrap to first column; 3=Move down by row, hold on last row; 4=Move down by row,
return to column 1, hold on last row. Default: 0.
TickPerUnit GRID
Display units in grid "ruler". Sets the number of ruler-style "ticks" between numbers
(units) displayed in the header cells (row and column) of the grid; e.g.,
'TickPerUnit=8 will display a number every 8 ticks on the ruler and causes median
points (at 'TickPerUnit/2) to appear slightly larger. Ruler numbers begin at zero and
count upwards by whole numbers, but will be reset to zero again if the header cell
contains a 'Value$ greater than null. Default: 0.
TickPixels GRID
Pixels between ticks in grid "ruler". This sets the space in pixels between ruler-style
"ticks" (marker lines) displayed in the header cells of the grid.
Tip$ BUTTON CHART CHECK_BOX DROP_BOX GRID LIST_BOX LIST_VIEW MULTI_LINE
RADIO_BUTTON TREE_VIEW TRISTATE_BOX VARDROP_BOX VARLIST_BOX
Tip message for control.
Title1$ CHART
Primary chart title.
Title2$ CHART
Secondary chart title.
Top BUTTON CHART CHECK_BOX DROP_BOX GRID H_SCROLLBAR LIST_BOX LIST_VIEW
MULTI_LINE RADIO_BUTTON TREE_VIEW TRISTATE_BOX VARDROP_BOX VARLIST_BOX
V_SCROLLBAR
Top of control in pixels.
TopBorder GRID
Top border of cell (thickness): 0 to 3 pixels. Default: 0.
TopLeftTick$ GRID
Top left tick. When set to a colour, this displays a tick in the top left corner of the cell.
Valid colour names are listed under Colour Properties, p.723. Default: "DEFAULT".
TrackColour$ GRID
Cell tracking colour. Header cells corresponding to a cell that currently has focus are
switched to colour set by this property as the user moves around the grid. This
provides a visual cue to the user for which column and row they are currently on.
Only header cells that use their default colour will change to the tracking colour.
Valid colour names are listed under Colour Properties, p.723. Default: "DEFAULT".
TrackColor$ Cell tracking colour – US spelling. See above.
XAxisLocation$ CHART
X-Axis location. ("Back" or "Bottom"). Default: "Bottom"
XAxisTitle$ CHART
X-Axis title.
YAxisLocation$ CHART
Y-Axis location. ("Back" or "Left"). Default: "Left"
YAxisTitle$ CHART
Y-Axis title.
ZAxisLocation$ CHART
Z-Axis location. ("Bottom" or "Left"). Default: "Left"
ZAxisTitle$ CHART
Z-Axis title.
Colour Properties
The properties used to define colour attributes in various graphical control objects
include the following:
BackColour$ CurrentCellColour$ FillColour$ TextColour$
BackHilight1$ FaceColourBack$ HoverColour$ TrackColour$
BackHilight2$ FaceColourBottom$ LineColour$
BottomLeftTick$ FaceColourLeft$ TopLeftTick$
To apply a colour to these properties, use one of the following valid colour names:
"DEFAULT" "Dark Gray"
"Black" "Dark Red"
"Light Red" "Dark Green"
"Light Green" "Dark Yellow"
"Light Yellow" "Dark Blue"
"Light Blue" "Dark Magenta"
"Light Magenta" "Dark Cyan"
"Light Cyan" "Light Gray"
"White"
... or use a RGB code (RGB:n n n where n=0-255) or user-defined colour (refer to the
'COLOUR' & '_COLOUR' Mnemonics, p.592).
Compound Properties
CompoundProperties
Initially, control object properties were introduced to provide dynamic access to the
basic attributes of a control object in ProvideX. The original list of properties covered
obvious features (Height, Font$, Text$) in graphical control objects, but as this list
continues to expand with each new release of ProvideX, so does the variety of
features that can be defined via properties.
Many of the latest properties are designed to provide characteristics and behaviour
that go way beyond what can be defined by directives alone. Most attributes are
defined using individual properties; however, some extended functionality is
contingent on sets of two or more (compound) properties and require more complex
manipulation. The following sections identify and describe these groupings.
Multi-Property Access
The following properties allow an application to set/get values for more than one
Multi-Property Ac es
The ability to handle multiple reads is useful for accessing properties across a
WindX/JavX connection, particularly when dealing with an object that has a large
number of properties such as a grid. This can boost performance and reduce the
amount of network traffic.
To retrieve the value of multiple properties, first set '_PropList$, then read
'_PropValues$; e.g.,
G1'_PropList$="CurrentColumn,CurrentRow,Value$"
x$ = G1'_PropValues$
In this example, x$ receives a string containing the values of CurrentColumn,
CurrentRow, and Value$, with each field separated by either the standard SEP
field separator, or with the '_PropSep$ character.
On-demand loading allows an application to load a list box with only those items
the user actually scrolls into view. This reduces network traffic and file access since a
list box is only loaded with those items required by the user. Also, it assures proper
function of the scrollbar and its relationship to the list.
This feature requires the developer to pre-declare the number of items that the list
box is to have (by setting the 'ItemCount property). When the user scrolls items into
view, the system generates a CTL event.
Upon receiving the CTL event (set by 'ItemNeededCtl), the application queries
‘ItemNeededFrom and ‘ItemNeededTo to determine the index number and the
number of items. The application then loads the list box with the contents of the
specified items by setting 'Item and 'ItemText$. If no elements are needed then
'ItemNeededFrom and 'ItemNeededTo will be zero. Once the value has been
loaded into the 'ItemNeededTo, ProvideX checks if further items are required and if
so, it generates another CTL event.
In the case of a Report style list box, should the user request the list be sorted or
attempt to auto-size the width of a column, the system will force a load of all list box
elements before processing the request.
In some instances the contents of the list box may need to be shown prior to the contents
being loaded, in which case the system will display 5 dots in place of the data.
For more information, refer to the LIST_BOX Directive, p.178.
In Tree Views
In addition to the above properties, tree view controls support the following:
'SelectedChildren Number Of Child Items.
'SelectStateMask State filter to apply.
In Grids
The following properties can be applied to grids for access to selected items based on
the location defined by 'SelectIndex:
'SelectRow Row number of selected cell.
'SelectColumn Column number of selected cell.
'SelectValue$ Value within selected field.
State indicators are basically images that will appear in front of a Tree View entry
that can be used to indicate whether the item has been selected or not. State
indicators are currently only supported for tree view list boxes and can set up during
the definition of a list box control via the LIST_BOX Directive, p.189. For
information on assigning images, toggling states, cascading states, and loading items
with state indicators, see List Box, p.166 in the User’s Guide, Chapter 6.
When dragging off of a grid, the starting point must be a column or row header. If a
column header is used and column swapping is enabled using the 'SwapEnabled
property, then the drop target must be a control other than the grid itself. This is
because dragging a column header within the grid is how columns are swapped.
Example:
1600 ! 1600 - Drag and drop rows from g1 (grid 1) to g2 (grid 2)
1610 ROW_DROP:
1620 LET R=G1'DRAGGEDROW; IF R<1 THEN RETURN
1630 LET G1'ROW=R
1640 READ DATA FROM G1'ROWDATA$ TO IOL=G1'LOADIOLIST$
1650 GRID DELETE G1,0,R
1660 LET R=MAX(1,MIN(G2'DROPPEDONROW,G2'ROWSHIGH))
1670 GRID ADD G2,0,R; LET G2'ROW=R
1680 LET G2'ROWDATA$=REC(G2'LOADIOLIST$)
1690 RETURN
For more information, refer to the GRID Directive, p.142.
The following properties are used to load and access a grid by row:
'LoadList$ Lists column names in the order they appear physically in the grid.
'LoadIOLIST$$ Same list of variables as 'LoadList$, but in compiled IOList
format.
'RowData$ Returns or sets a complete row of data corresponding to the
names defined in the 'LoadList$. Each cell value is separated by
the defined column separator character, 'Sep$.
'LoadList$ returns a list of column names in the order in which they physically
appear within the grid object. When a grid is defined using FMT= in the GRID
directive, or columns names are assigned to columns in a grid, 'LoadList$ returns a
list of those column names in their current display order. The compiled version,
'LoadIOLIST$ simplifies the loading of grid rows from direct file contents or other
IOList-based items; e.g.,
myGrid.ctl'RowData$=rec(myGrid.ctl'LoadIOLIST$)
GRID LOAD myGrid.ctl,1,row,rec(myGrid.ctl'LoadIOLIST$)
The 'RowData$ property returns or sets a complete row of data in accordance to the
names defined in 'LoadList$ or 'LoadIOLIST$. The data returned is for the row
currently identified by the 'Row property, e.g.,
READ DATA FROM X'ROWDATA$ TO IOL=X'LoadIOLIST$
or
X'ROWDATA$=REC(X'LoadIOLIST$)
Because the properties 'LoadList$, 'LoadIOLIST$ and 'RowData$ use logical column
names, column swapping has no impact.
properties:
‘Row Grid row reference.
‘Column Grid column reference number.
‘Column$ Grid column name.
To access an entire row, set ‘Column to 0. To access an entire column, set ‘Row to 0.
The entire grid can be access by setting both ‘Column and ‘Row to 0. For more
information, refer to the GRID Directive, p.142.
The following are used to identify specific labels (datasets and data points) in which to
apply a variety of CHART properties:
‘CurrentSet Current data set.
‘CurrentPoint Current data point.
Overview BMK
ProvideX syntax also includes a set of special names that are used to access built-in
virtual files, devices, and interfaces. These names are recognized and processed
internally in the language at run time. The following ProvideX virtual files and
output interfaces are covered in this chapter:
*BITMAP* Generates a 24-bit colour bitmap image in memory. This is for use in
WindX or Windows only. See *BITMAP* Virtual Bitmap, p.732.
*HTML* Generates an HTML-formatted output file. See *HTML* Print to
HTML, p.734.
*MEMORY* Establishes a memory-resident logical file. See *MEMORY* Create
& Use Memory File, p.735.
*PDF* Generates a PDF-compatible output file. See *PDF* PDF Print
Interface, p.738.
*SYSTEM ProvideX internal event handling. See *SYSTEM Event handling
Object, p.745.
*VIEWER* Sends output to the ProvideX Print Preview facility. This is for use
in WindX or Windows only. See *VIEWER* Print Preview, p.746.
*WINDEV* Sends hardcopy output to the Windows print subsystem in raw or
pass through mode. This is for use in WindX or Windows only. See
*WINDEV* Raw Print Mode, p.750
*WINPRT* Sends hardcopy output to the Windows print subsystem using
standard API access. This is for use in WindX or Windows only. See
*WINPRT* Windows Printing, p.754.
*XML Interface for accessing, parsing and serializing XML documents
based on the XML DOM (Document Object Model). See *XML
ProvideX XML Interface, p.758.
Where:
Description *BITMAP* is a logical filename that can be used to capture graphical output ( 24-bit
colour bitmap image) in memory. *BITMAP* can be opened and sent output, in
much the same way as the *WINPRT* print interface. Once an image is generated in
*BITMAP*, it can then be sent to either the screen or printer via the 'PICTURE'
mnemonic. It could also be saved to a bitmap file (.bmp) via the SAVE FILE directive.
Warning: 24-bit colour at high DPI (resolution) can use very large amounts of memory.
If there are insufficient operating system resources available, the result will be an
Error #15: Operating system command failed.
Examples To display a generated image using the 'PICTURE' mnemonic, specify the channel
number associated with the *BITMAP* file preceded by a '#'.
The following version of this example includes syntax that allows it to be used in a
client-server application.
Description *HTML* is a logical print file that can be used with ProvideX. It allows printed
reports, using normal fixed fonts, to be formatted for use with an HTML viewer such
as a browser.
The system will prompt for an output filename to store the resulting HTML
document.
Description ProvideX supports a memory-resident logical file called *MEMORY*. This file may
consist of a queue of records that can be accessed by index or by single key, or it
may be a multi-key file accessed by key, depending on the format used to create it.
Create the memory-queue file and assign the given logical file number (channel) via
the OPEN directive.
Use CLOSE (chan) to delete a *MEMORY* file and return memory to the system.
The first WRITE determines the file access method; i.e., the IND= option specifies
Indexed file handling, and KEY= specifies Direct file handling (externally-keyed
files). The maximum key size for *MEMORY* files is 8192 characters. Adding records
to a *MEMORY* file by IND( ), pushes all the records at that index down one, and
inserts a new record. To modify a record in an index file, remove the old record and
then insert the new one. The functions IND( ), p.453, KEF( ), p.462, KEL( ), p.463,
KEN( ), p.464, KEP( ), p.465, KEY( ), p.466, and RNO( ), p.510 can be used with
memory-queue files.
Note: The ability to access a memory file in a mixed mode (by KEY= and/or IND=) is
not supported.
Examples The following example illustrates how to open and use *MEMORY* using Format 1:
00010 mmf=hfn
00020 open (mmf)"*memory*"
00030 print 'CS'
00040 input "Name (Press F4 to end):",name$
00050 if ctl=4 then goto 0100
00060 input "Address:",addr$
00070 input "Position:",pos$
00080 write (mmf,key=name$)iol=mmfLst
00090 goto 0030
00100 print 'CS'
00110 select iol=mmfLst from mmf begin "" end "z"
00120 print "Name:",name$
00130 print "Address:",addr$
00140 print "Position:",pos$
00150 print "----------"
00160 next record
00170 end
00180 mmfLst: iolist name$,addr$,pos$
The following example illustrates how to open and use *MEMORY* using Format 2:
0010 mmf=HFN
0020 OPEN (mmf)"*memory*;keydef=[1:1:20],[2:1:60],[3:1:20]"
0030 PRINT 'CS'
0040 INPUT "Name (Press F4 to end):",name$
0050 IF CTL=4 THEN GOTO 0100
0060 INPUT "Address:",addr$
0070 INPUT "Position:",pos$
0080 WRITE (mmf)IOL=mmfLst
0090 GOTO 0030
0100 PRINT 'CS'
0110 SELECT IOL=mmfLst FROM mmf,KNO=1 BEGIN "" END "z"
0120 PRINT "Name:",name$
0130 PRINT "Address:",addr$
0140 PRINT "Position:",pos$
0150 PRINT "----------"
0160 NEXT RECORD
0170 END
0180 mmfLst: IOLIST name$,addr$,pos$
Description Use *PDF* for directing output to a PDF (Postscript Document Format) compatible
file. This interface operates in a similar manner to *WINPRT*. If the output file name
is omitted, a dialogue appears at run time for users to specify the path, PDF name
and properties.
An OPEN may specify a number of semicolon separated options for the PDF. These
may be included as part of the path, or within an OPT= clause:
OPEN(chan)”*PDF* [;option] [;option] […]”
OPEN(chan,OPT=”option;option;…”)”*PDF*”
Margin Settings
Values for margin settings are typically given in 1000ths of an inch; however, the
following also applies.
If the value contains the letter I, it is considered inches. If the value contains the letter
M, it is considered millimetres. If the value contains a decimal point, or the value is
less than 25, then it is not considered 1/1000th but as either inches or millimetres.
Example:
MARGINS="250:250:250:250" All 4 margins are 250/1000's (1/4 inch)
MARGINS="1:1:1:1" all margins are 1 inch
MARGINS="1i:1i:1i:1i" all margins are 1 inch
MARGINS="1.25:1.25:1.25:1.25" all margins are 1-1/4 inches
MARGINS="20m:20m:20m:20m" all margins are 20 millimeters.
General Information
If neither the FORM= or PAPERSIZE= is given, or the value for either of these two
parameters cannot be found in the Forms Library, then the default LETTER size (8.5" x
11") size is assumed. If both FORM= and PAPERSIZE= are given, the FORM= option
has priority.
For further details, see Forms Handling, p.742.
If the ASIS or DISPLAY options are not specified and no FILE= is given, then the
system prompts the user for the file. If ASIS is specified, but no FILE= has been
defined by a prior open to *PDF*, then ProvideX will generate an Error #12:
File does not exist (or already exists).
The filename specified by FILE= cannot have a [WDX] prefix. If the user wants
output to go to a remote file they should issue the open as follows:
OPEN (nnn) "[WDX]*PDF*…".
In order to simplify the logic behind this process and allow for developer
customization, whenever *PDF* is opened, the input pathname is forwarded for
processing to the user-defined program *ext/pdf (if it exists) or the
ProvideX-supplied program *ext/system/pdf. It determines if the selection window
should be presented and validates the FORM= and PAPERSIZE= options.
These options passed may be retrieved via PTH( ) and OPT( ).
Example:
OPEN (1) "*pdf*;FILE=/tmp/pvx.pdf; FORM=Letter:8.5in:11in"
Font Support
*PDF* supports the use of all TrueType and Type 1 fonts, in addition to the following
basic PDF fonts:
"Courier", "Courier-Bold", "Courier-BoldOblique",
"Courier-Oblique", "Helvetica", "Helvetica-Bold",
"Helvetica-BoldOblique", "Helvetica-Oblique", "Times-Roman",
"Times-Bold", "Times-Italic", "Times-BoldItalic","Symbol",
"ZapfDingbats"
To enable TrueType and Type 1 font support, *PDF* uses Libharu, an open-sourced
library for generating PDF. TCB(191) will return 1 if ProvideX is compiled with
LibHaru. LibHaru support requires the existence of the libharu.dll (installed
with ProvideX) and 'HP' parameter setting.
Creating Bookmarks
Bookmark pointers can be inserted into a generated PDF so that when the bookmark
is selected in the document, it will display a specified page/line/column; e.g.,
PRINT (pdf_channel) 'OPTION'("BOOKMARK", "bookmark_txt"),
The bookmark_txt defines the text and hierarchy of the bookmark, with each level in
the tree being separated by a character in the range of $00$ to $1F$ (less than a
space). The bookmark tree is output in the order the bookmarks are issued. The
maximum length for the complete bookmark text is 254 characters (including all
levels and separators).
If a duplicate bookmark is issued, then the last occurrence will take precedence. This
process enables the generation of a list of bookmarks whose order does not match
that of the output document.
While bookmarks are rendered in the current text colour, they can be bolded by
surrounding the 'OPTION' with 'BB'/'EB' mnemonics, or italicized using 'BR'/'ER'
mnemonics. Both options can be specified together; e.g.,
PRINT (pdf_chan)'BB','OPTION'("BOOKMARK",
"Company$+$01$+Division$+$01$+Manager$+$01$"),'EB',
When a PDF file is created with a bookmark, the system automatically sets the PDF
file to display bookmarks upon opening. The location to which a bookmark
refers/points is determined based on the last output printed to the PDF channel, i.e.,
• Normal Text, @(c), @(c,l), 'CR', 'LF', 'FF' - position on the page as of the end of
printing the output.
• 'LINE', 'RECTANGLE', 'CIRCLE', 'TEXT', 'ARC' - starting point as defined by the
mnemonic.
Limitations
The following are known limitations that control options under the ProvideX PDF
interface:
• Invalid mnemonics are ignored.
Forms Handling
The ProvideX-supplied utility program *ext/system/pdf is embedded with a forms
handling mechanism that validates and displays dialogues to the end user. To
provide consistency with Windows forms handling, the PDF output paper size is
determined via form name rather than by the physical dimensions of the paper.
For the purposes of the PDF handler, the FORM= option provides a form name
followed by a colon, and include the paper size in terms of width and height. The
paper size values are assumed to be in thousandths of an inch unless followed by the
letter I (for inches) or the letter M (for millimetres).
The PDF processor within ProvideX will only utilize the width and height portions
of the FORM= option. The form name is provided strictly as a reference for the
display.
The Form Library is a keyed file. The PDF utility program will search for
*ext/forms.xx then for *ext/system/forms.xx, where xx is a language code.
The properties for this file are:
Field
Form Number Primary key, 3 digits. Explained below.
Name of Form Alternate key, 24 characters
Width
Height
Units of Measure (I or M)
Priority Alternate key, Priority$+ Form number
The *ext/system/forms.en file is pre-loaded with standard form sizes. The PDF
selector window allows for additional forms to be added to the file. When the first
form is added to this file by the end user, a copy of the file *ext/system/forms.xx is
made in *ext/forms.xx, which is then used.
Description This object simplifies event handling in ProvideX. Use this object to turn event
handling on and off and to isolate any syntax changes from your programs. To
prevent an application from looping endlessly, a limit of 64 nested events has been
imposed. The interface supports the following syntax options:
SETTIMER (secs)
Method Call. Fires a "timeout" event in ProvideX on intervals the number of seconds
indicated by secs. The timer will continue to fire timeout events until a SETTIMER(0) is
issued. The handling method will not receive any value when the event occurs.
(Windows Only).
SIGNALONDATA(chan, 0|1)
Method Call. Fires a "data available" event on the channel number given. A 1 indicates
that the function is enabled; a 0 indicates that it is not. The channel number (chan) must
refer to only certain kinds of files: console, TCP, serial connection, pipes and I/O
redirection. The handling method will receive the channel number when the event
occurs.
SIGNALONCLOSE(chan, 0|1)
Method Call. Fires a "file close" event for the channel number given. A 1 indicates that
the function is enabled; a 0 indicates that it is not. The handling method will receive the
channel number
SIGNALONOPEN( 0|1)
Method Call. Fires a "file close" event for the channel number given. A 1 indicates
that the function is enabled; a 0 indicates that it is not. The handling method will
receive the channel number.
SIGNALLOADCLASS( 0|1)
Method Call. Fires a "load class" event whenever a class definition needs to be loaded
into the system either through a NEW or LIKE directive. The handling method will be
passed the name of the class required.
Once the event is serviced the system will re-check to see if the desired class is now
present if not (or no event service provided) the standard load of a ".pvc" file will
occur.
Description The *VIEWER* (graphical print preview) is a special device file for previewing reports
exactly as they would appear when output via *WINPRT*. This invokes the Viewer user
interface, which is able to display currently-spooling print jobs, copy to the clipboard,
and print jobs stored on the disk. Other features of this interface include:
• Handling of reports from 0 to 50,000 pages in size.
• View options 1 page, 2 pages, 2-page book style, and 4 pages at a time.
• Zooms from 10% to 400% in increments or custom levels with fit-to-width and
fit-to-window zoom options,
• Portrait and landscape modes.
The different methods for starting and using the Viewer user interface are described below.
Examples The following example illustrates how to open and use the *VIEWER* for print
preview:
0010 LET CHAN=UNT; OPEN (CHAN)"*VIEWER*"
0020 PRINT (CHAN)'FONT'("Courier New",-10),'DF',
0030 PRINT (CHAN)'FONT'("Arial",2),'TEXT'(@X(2),@Y(2),"Fonted Text"),
0040 PRINT (CHAN)'PICTURE'(@X(3),@Y(5),@X(43),@Y(30),"*win/nomads2"),
Note: Set the 'BM' Mnemonic, p.587, to ON to have the *VIEWER* send all data directly
to the print file without interpretation. This allows you to send print jobs to any Windows
printer that is available on the client PC. The *VIEWER* filters out the first and/or last
page if either is blank.
Description Use *WINDEV* with your OPEN and/or OPEN INPUT directives to gain access to the
Windows print subsystem in raw or pass-through mode. For standard API access,
use *WINPRT* Windows Printing, p.754.
You can identify the LPT for direct local access to the port or use UNCs (Universal
Naming Conventions) for transmissions to a shared resource. For both LPT and
UNC use, note that you can use raw escape sequences but graphical printing is not
supported. LPT identification is not recommended under Windows Server.
Normally, you can take advantage of *WINDEV* to send data to the printer without
having the driver strip out escape codes (for instance, to pass PCL code to the
printer). That is, you can use escape sequences with *WINDEV*, but these must be
both valid and supported by your given printer and print driver.
ProvideX recognizes *WINDEV* as a special device file in your OPEN [INPUT]
directive and deals with it internally in the language at run time. ProvideX returns
an Error #12: File does not exist (or already exists) on the OPEN
if no printers are installed or if the user presses the Cancel button in a printer
selection dialogue. (This error can also occur if no printer is "Set As Default".)
This is because internally there are actually two channels open: one ProvideX is
using to route printing to WindX and one WindX opens, connected to the actual port
on the client. Your mnemonic is run locally on the server's channel and is not sent to
WindX for the remote client.
To send the mnemonic to the client in older versions of ProvideX/WindX, you can
either:
• Create a device driver containing mnemonic definitions on the WindX client PC
and then use a CALL directive; e.g., CALL [WDX]*dev/your_driver_name , or
• Use an EXECUTE directive from the server side for mnemonic definitions on the
client; e.g., EXECUTE "[WDX]MNEMONIC (LFO)'XX'=....".
For further information, refer to the MNEMONIC Directive, p.210 and the [WDX]
Tag, p.795.
Description Use *WINPRT* with your OPEN and/or OPEN INPUT directives to gain standard
API access to the Windows print subsystem. For raw or pass-through mode, use
*WINDEV* Raw Print Mode, p.750.
The device driver for your given printer interprets the data you send to the
*WINPRT* channel, then sends the output to the Windows spooling subsystem for
transmission to its destination. You can identify the LPT for direct local access to the
port or use UNCs (Universal Naming Conventions) for transmissions to a shared
resourc; however, LPT identification is not recommended under Windows Server.
Some printer device drivers are unable to handle invalid Q_options; i.e., unknown
property assignments and/or syntax errors (like range=1,5 instead of the correct
range=1:5). The result can be unpredictable. The driver can even cause your
ProvideX session to hang during the open. If you encounter unexpected problems,
invalid Q_options for the given driver are the likely cause.
Note: Escape sequences are not allowed with *WINPRT* and may have an unpredictable
effect on the device and/or printer driver. If you need access to the print subsystem to send
PCL, escape sequences, etc., use *WINDEV* Raw Print Mode, p.750.
Note: The 'FONT' mnemonic works with *WINPRT*, but not with any of the text-mode
printers.
Maximum column and line values are zero-based. In the following example, the
MXC( ) value returned is 79, for 0-79 = 80 columns:
C=MXC(30)+1 ! For this printer MXC(30) returns 79, C=80 (0-79)
L=MXL(30)+1 ! For this printer MXL(30) returns 55, L=56 (0-55)
Your string variable in reading properties returns a printer-specific list (here, for the
ASIS printer):
WINPRT_SETUP READ PROPERTIES WHAT_PROP$
-:?what_prop$
RANGE=ALL;COLLATE=NO;COPIES=1;ORIENTATION=PORTRAIT;PAPERSIZE=1;SOURCE=1;R
ESOLUTION=300:300;OFFSET=0:0;TRUETYPE=2;DRIVER=WINSPOOL
-:close (30)
Description Use this interface for accessing, parsing and serializing XML documents based on
the XML DOM (Document Object Model).
This also requires installation of the Xerces XML Library as well as libraries
pvxxml.dll (for Windows) and pvxxml.so (on UNIX/Linux). TCB(193) can be
used to determine the availability of XML support on a system.
In addition, the following directives are supported for use with XML objects:
DROP OBJECT obj_id
DELETE OBJECT obj_id
The interface supports the following syntax options for accessing and manipulating
XML documents:
XML'CREATE (filename$, options$[,ERR=stmtref])
Creates and opens an XML document with a given file name and document root.
Where:
filename$ XML document file name
options$ Control options for operation of the interface. Case-insensitive,
semi-colon delimitated, formatted string. Options include:
API={DOM|SAX} - default is DOM (SAX interface not implemented).
SOURCE={FILE|STRING} - default is FILE.
DOC_ROOT=root_node$ - for creating a new XML document.
OVERWRITE=[0|1] - for overwriting an XML document, default is 0.
The document is created with ISO-8859-1 encoding. If an error occurs on executing XML
functions, PRINT MSG(-1) can be used to view a detailed error message. Generates
the following return codes:
1 - Opened successfully
0 - General error
-1 - Warning occurs when parsing XML document
-2 - Error occurs when parsing XML document
-3 - Fatal error occurs when parsing XML documents
XML'READ_ELEMENT$ (returnfield[,ERR=stmtref])
Sets the current element for reading and writing. Returns the value string.
Where:
returnfield 1 for value of current element (default), 2 for name of current element .
XML'NEXT_SIBLING ( )
Sets the current element to the next sibling. Generates return codes:
1 - Set element successful
0 - Set element failed
XML'PREVIOUS_SIBLING ( )
Sets the current element to the previous sibling. Generates return codes:
1 - Set element successful
0 - Set element failed
XML'READ_CHILDELEMENT$ (tag_name$[,ERR=stmtref])
Reads the value of the child element specified by tag_name$ (sub-element tag). This
returns the value string, or empty string if it is not found.
XML'READ_ATTRIBUTE$ (attribute_name$[,ERR=stmtref])
Reads the value of the attribute in current element specified by attribute_name$. This
returns the value string, or empty string if it is not found.
If output buffer has not been initialized using XML'BUILD( ), an error will be reported.
XML'COMMIT( )
Commits the output buffer to the XML document file/string. If a buffer has not been
initialized using XML'BUILD( ), an error will be reported.
XML'CLOSE( )
Closes the XML document, cleans-up workspace and releases any resources that are
used. Generates return codes:
1 - Close failed
0 - Close successful
Example Following is an example of the ProvideX XML Interface object in use for
reading/writing XML documents.
Overview BMK
Special command file tags (enclosed in square brackets) are used to modify paths and
filenames for specific I/O uses in ProvideX. They may include a series of semicolon-
separated parameters to be processed at run time. Some of these tags are supported only
in specific operating environments.
Important: The square brackets enclosing special tags are part of the syntax. Other
square brackets in syntax examples indicate that elements are optional.
This chapter covers the following special command tags:
[DB2] DB2 Support, p.764 Windows & WindX.
[DDE] Dynamic Data Exchange, p.770 Windows & WindX.
[DLL] Custom File Access, p.772 Windows & WindX.
[LIB] Program Library, p.775 Windows only.
[MYSQL] MySQL InnoDB Support, p.777 All platforms
[OCI] Connect to Oracle Server, p.780 Windows, some UNIX/Linux.
[ODB] Open DataBase, p.785 Windows & WindX.
[RPC] Remote Process Control, p.791 All platforms
[TCP] Transmission Control Protocol, p.793 All platforms
[WDX] Direct Action to Client Machine, p.795 Any platform via WindX.
Note: [WDX] specialty commands can only be used when running under WindX. You can
also prefix some (but not all) of the other specialty command tags with a [WDX] tag to
direct the action to the WindX client machine instead of the server.
WindX, the ProvideX thin-client GUI screen handler, is used to give a Windows GUI
look to character-based applications, optimize a network's use of different platforms,
and provide remote processing through serial and/or TCP/IP communications.
Description The [DB2] tag is used as a prefix in an OPEN statement to denote that ProvideX is to
route all file I/O requests to an external DB2 database server. Once you open a channel
for [DB2] use, you can use it just like any other channel (i.e., for file I/O). It remains open
until you close it. Use TCB(198) to check if DB2 is supported on a platform.
Note: This feature requires activation of ProvideX DB2 support. Refer to the
ProvideX website for licensing information.
If the keywords USER= or PSWD= are supplied on the open then the
values of these attributes will be appended to the connection string.
"CURSOR_TYPE=" Defines the type of cursor that is to be used. FORWARD indicates that
any result sets can be read in a forward only direction. (INI supported)
STATIC indicates that the result set is static. KEYSET forces the cursor to
use/maintain record keys in a Keyset. DYNAMIC indicates that the
cursor is effective in the current Rowset only.
"CURSOR_USE=" Defines the type of cursor to be used. (INI supported) DRIVER
(default) assumes the specific driver’s own cursors. ODBC causes
the ODBC interface to use the “Driver Managers” cursor library that
may provide additional functionality not available within the
database driver. IF_NEEDED tells the system to use the specific
database driver's own cursor functionality unless the additional
functionality is requested specifically.
"DATEFMT=" Date format mask applying to all date fields in table. (INI supported) This
can be a combination of Y M D with any other characters; e.g., to convert
dates to 4-character year, month and day: DATEFMT=YYYYMMDD.Other
characters are inserted as is; e.g., DATEFMT=YY/MM/DD with a date of
March 1, 2004 would be returned as 04/03/01.
Two packed century formats are also supported. The first format, AA, maps
A to 2000. Our example of March 1, 2004 with DATEFMT=AAMMDD would be
returned as A40301. The second format, KK, is similar except K maps to
2000. A DATEFMT=KKMMDD would return K40301 for the example.
"DB=" or Qualifies the specific database that you wish to use when using a
"QUALIFIER=" driver to service multiple databases. (INI supported)
"DEBUGIT=" String to append to SQL statement along with program name
and line number for debugging purposes. (INI supported) This
must indicate the comment character(s) appropriate to the
database. For example, "--" is the comment identifier for
Microsoft SQL Server; anything after "--" is ignored by SQL
Server when compiling the SQL statement.
"EXEC_SPRNO=" Name of stored procedure used to emulate RNO( ) function. You
must create a stored procedure for each table and key that an
RNO is need for. Format: spRNOtablename_keynumber.
"EXTROPT=" Controls the format of the SELECT statement used to process an
EXTRACT. (INI supported) By default, PVX generates a SELECT *
FROM table FOR UPDATE WHERE...
When EXTROPT=text, then text is substituted in place of FOR
UPDATE. In addition, if the first character of text is $, then the
remaining characters of text are placed at the end of the SELECT
statement rather than after the filename. This allows for different
variations of SQL to be supported.
"PSWD=" Specifies password. (INI supported, but not secure. Anyone with
access to the INI will be able to read this password.)
"REC=" Provides the column names, type, and size. This is typically done to
improve performance. If this information is not provided, then
ProvideX must query the database for this information. For more
information, see ODB/OCI/DB2 Record Processing, p.783.
"RECDATA=" Identifies a column to return as the full record. This can be used
for variant records which use complex rules to identify the
record type.
"ROWSET_SIZE=" Size of the Rowset used by the cursor. (INI supported)
"SHARED" Sets all tables to share a single connection to the Oracle database.
Default.
"STDDATE" Overrides the above formatting on individual columns.
"STRIP" Removes trailing spaces from fields
"TEXTMAX=" Overrides maximum size for text fields (default is 4096 bytes).
(INI supported)
"TIMEOUT=" Defines the time out value for any SQL operation (time before
error 0 returned). (INI supported)
"TOP=" Specifies use of the TOP clause in SELECT statements (limits the
number of rows to return in a result set). (INI supported) If TOP=n is
non-zero , then the KEF( ) / KEL( ) functions issue a SELECT TOP
1... SQL statement, which improves system performance. If TOP=n
> 0, then PVX issues SELECT TOP n to reduce the data transferred.
TOP=-1 indicates the driver supports SELECT TOP, but normal
reading should not use it. Default is 0 (TOP not supported).
"TSQL=" Defines a SQL statement that is used to control what data the
logical file returns.
"TYP=" Sets identifier for different variant records. For more information
see ODB/OCI/DB2 Record Processing, p.783.
"UNIQUE" Sets new opens to be on a unique connection to the database.
(INI supported) When used in an INI file, set UNIQUE=1, Y or y.
UNIQUE=0, N or n indicates a shared connection.
"USER=" Specifies login name. (INI supported)
Example To open a connection to a DB2 table using the column names to generate the IOList:
OPEN (14,IOL=*)"[DB2]DB2instance,DB2table"
Description The [DDE] tag is used as a prefix in an OPEN statement to denote that ProvideX is to
route all file I/O requests to an external DDE application; e.g., Excel. ProvideX
recognizes the tag and deals with it internally at run time.
You can associate a CTL value with an item in a DDE application to have ProvideX
generate the CTL value automatically whenever the value of the associated item
changes; e.g,
0010 DEFCTL (dde_fileno)"item"=ctl_event
Troubleshooting
In the event that the DDE server is unavailable, ProvideX will attempt to start the
application and establish a DDE connection to it. The following paths are used to
locate the application:
• Directory from which the application loaded
• Current directory
• Windows system directory
• Windows directory
• All directories listed in the PATH environment variable.
If these search rules cannot locate the application, then an Error #10: Illegal
pathname specified will be reported, and MSG(-1) will contain text similar to
"DdeConnect Failed (err/ret=2/16394)."
Note: SYSTEM_HELP has an advantage over the INVOKE directive because it uses
different Windows API calls that are better for locating the program in question.
Example This example illustrates an export to an Excel spreadsheet. Note that the worksheet
name is optional, but the worksheet must exist if you include its name. This example
also demonstrates the use of $09$, Tab , as the separator for Excel and makes
selective graphical requests to draw a pie chart, etc.:
0010 OPEN (1)"[WDX][DDE]excel;existing_worksheet.wk1"
! or 0010 OPEN (1)"[wdx][dde]Excel;"
0020 OPEN (2)"SALES"
0030 LET R=0
0040 LOOP:
0050 LET DIV_ID$=KEY(2,END=DRAW_IT)
0060 READ (2,KEY=DIV_ID$)DIV_NAME$,DIV_SALES
0070 LET R=R+1 ! Bump row number
0080 LET K$="R"+STR(R)+"C1:R"+STR(R)+"C2"
0090 WRITE RECORD (1,KEY=K$)DIV_NAME$+$09$+STR(DIV_SALES)
0100 GOTO LOOP
0110 DRAW_IT:
0120 IF R=0 THEN STOP ! No divisions
0130 LET X$="R"+STR(R)
0140 WRITE RECORD (1)"[select(""R1C1:"+X$+"C2"","""+X$+"C2"")]"
0150 WRITE RECORD (1)"[new(2,1)]"
0160 WRITE RECORD (1)"[gallery.3d.pie(6)]"
0170 WRITE RECORD (1)"[window.maximize()]"
0180 WRITE RECORD (1)"[app.maximize()]"
Description The [DLL] tag is used as a prefix in an OPEN statement to denote that ProvideX is to
route all file I/O requests via an external DLL (Dynamic Link Library) file. This is
intended primarily for mapping to customized (user-defined) routines for file access.
For access methods in ProvideX using industry-standard mechanisms, refer to the
sections on the [OCI] and [ODB] tags.
Calling Sequence
This interface uses a single parameter block to handle all communication between
ProvideX and the DLL. Whenever a DLL entry point is called, the parameter block is
passed to it as its argument.
The DLL’s return value determines completion status. A successful completion returns
–1. Any other termination status is assumed to be a ProvideX error code; e.g.,
0 Record/File Busy
2 End of file
11 Record not found
12 File not found
#define IODLL_FNC_LOAD -1
#define IODLL_FNC_FREE -2
nMode Identifies the access method being applied during a READ/WRITE
operation. Possible access values include:
#define IODLL_MODE_NEXT 0
#define IODLL_MODE_BY_KEY 1
#define IODLL_MODE_BY_IND 2
#define IODLL_MODE_BY_RNO 3
lenBuffer Length of the data buffer used for READ/WRITE.
pBuffer Pointer to the data buffer to be used for READ/WRITE operations.
Note: For use in Windows only. Program libraries cannot be accessed remotely; i.e., the
[WDX] tag is not supported.
Description The [LIB] tag is used as a prefix to denote that ProvideX is to access programs in a
program library, a single keyed file/library where each record contains the object for
a program stored within.
Saving/loading programs from a single file reduces OS file searching and security
checking, and can improve system performance. Program libraries also make it
easier for application developers to ship and install applications. Fundamentally,
program libraries are transparent to applications and are handled much the same
way as directories.
The pathname for a program library is indicated as part of the prefix tag, following the
colon: [LIB:proglib]. The actual program name follows the prefix. For example, if the
program PROG01 is in the library /usr/myappl/proglib it would be referenced as
[LIB:/usr/myappl/proglib]PROG01.
To simplify access to libraries, they can also be defined in a PREFIX (generally a
program prefix); e.g., PREFIX PROGRAM "[LIB:/usr/myappl/proglib]".
Cached Libraries
The system automatically maintains a list of open program libraries. Libraries are kept
open if any programs within a library are in use. In addition, the system maintains a
cache of opened program libraries. By default the number of cached program libraries
is 10; however, this is alterable by setting the 'PL'= System Parameter, p.675. Program
libraries would be closed on a START, QUIT, or whenever 'PL' is changed.
Description The [MYSQL] tag is used as a prefix in an OPEN statement to denote that ProvideX is to
route all file I/O requests to an external MySQL database server. Once you open a
channel for use, you can use it just like any other channel (i.e., for file I/O). It remains
open until you close it. Use TCB(194) to check if MySQL is supported on a platform.
Note: This feature requires activation of ProvideX MySQL support. Refer to the
ProvideX website for licensing information.
"DATEFMT=" Date format mask applying to all date fields in table. (INI supported) This
can be a combination of Y M D with any other characters; e.g., to convert
dates to 4-character year, month and day: DATEFMT=YYYYMMDD.Other
characters are inserted as is; e.g., DATEFMT=YY/MM/DD with a date of
March 1, 2004 would be returned as 04/03/01.
Two packed century formats are also supported. The first format, AA, maps
A to 2000. Our example of March 1, 2004 with DATEFMT=AAMMDD would be
returned as A40301. The second format, KK, is similar except K maps to
2000. A DATEFMT=KKMMDD would return K40301 for the example.
"DEBUGIT=" String to append to SQL statement along with program name
and line number for debugging purposes. Refer to MySQL
documentation for comment styles. (INI supported)
"EXTROPT=" Controls the format of the SELECT statement used to process an
EXTRACT. (INI supported) By default, PVX generates a SELECT *
FROM table FOR UPDATE WHERE...
"FACTSDT" Causes all date fields to be translated to/from the SQL date format to
the format used by the FACTS application
"IND=" Identifies a column that contains a sequential number starting at
0. This is used to emulate an indexed file.
"KEY=" Identifies fields that make up the key(s).
"KEYDATA=" Identifies a column that represents the key. This is used to emulate
an external key where the data is not duplicated in the data.
"LOCKTABLES=" Determines if a MySQL LOCK TABLES statement or ProvideX
prefix file locking is used to lock tables. The default is using
prefix file locking. If a LOCK TABLES statement is used, a table
locked by a third party will cause ProvideX to wait for the table
to be released or until the MySQL connection is timed out.
"MAS90DATE" Reformats the contents of a date column to and from the Sage
MAS 90 date format.
"MAS90SET" Sets flags for Sage MAS 90 emulation, such as turning on the
MAS90DATE conversion.
"NONUMADJ=" Set to 1, Y or y to suppress +3 adjustment for defined length of
numerics. (INI supported).
"NONULLS=" Inserts zero-length strings rather than nulls into the target database, and
does not generate WHERE clauses checking for IS NULL or IS NOT
NULL. (INI supported) Set to 1, Y or y to enable or 0, N or n to
disable. If the application does not work correctly when moving
from Version 5 or lower, then set NONULLS=P to indicate that
keys are handled the same as pre-Version 6.
"NOSTRIP" Keeps trailing spaces (Default)
"NULLPADKEY" Forces keys to be padded to full length with the null character, $00$.
"PSWD=" Specifies password. (INI supported, but not secure. Anyone with
access to the INI will be able to read this password.)
"REC=" Provides the column names, type, and size. This is typically done to
improve performance. If this information is not provided, then
ProvideX must query the database for this information. For more
information, see ODB/OCI/DB2 Record Processing, p.783.
"RECDATA=" Identifies a column to return as the full record. This can be used
for variant records which use complex rules to identify the
record type.
"STDDATE" Use standard date formatting.
"STRIP" Removes trailing spaces from fields
"TEXTMAX=" Overrides maximum size for text fields (default is 4096 bytes).
(INI supported)
"TIMEOUT=" Defines the time out value for any SQL operation (time before
error 0 returned). (INI supported)
"TOP=" Specifies use of the LIMIT clause in SELECT statements (limits the
number of rows to return in a result set). (INI supported)
"TSQL=" Defines a SQL statement that is used to control what data the
logical file returns.
"TYP=" Sets identifier for different variant records. For more information
see ODB/OCI/DB2 Record Processing, p.783.
"UNIQUE" Sets new opens to be on a unique connection to the database.
(INI supported) When used in an INI file, set UNIQUE=1, Y or y.
UNIQUE=0, N or n indicates a shared connection.
"USER=" Specifies login name. (INI supported)
Description The [OCI] tag is used as a prefix in an OPEN statement to denote that ProvideX is to
route all file I/O requests to an external (not ProvideX) Oracle database. (OCI is an
acronym for Oracle Call Interface.) Once you open a channel for [OCI] use, you can
use it just like any other channel (i.e., for file I/O). It remains open until you close it.
Note: This feature requires activation of ProvideX OCI support (available for
Windows, Redhat, HP UX, Sun Solaris, and AIX). Refer to the ProvideX website for
licensing information. Use TCB(200) to check if OCI is supported on the platform.
Two packed century formats are also supported. The first format, AA, maps
A to 2000. Our example of March 1, 2004 with DATEFMT=AAMMDD would be
returned as A40301. The second format, KK, is similar except K maps to
2000. A DATEFMT=KKMMDD would return K40301 for the example.
"DEBUGIT=" String to append to SQL statement along with program name and line
number for debugging purposes. (INI supported) This must indicate
the comment character(s) appropriate to the database. For example,
"--" is the comment identifier for Microsoft SQL Server; anything after
"--" is ignored by SQL Server when compiling the SQL statement.
"EXEC_SPRNO=" Not applicable to Oracle at this time.
"EXTROPT=" Controls the format of the SELECT statement used to process an
EXTRACT. (INI supported) By default, PVX generates a SELECT *
FROM table FOR UPDATE WHERE... When EXTROPT=text, then
text is substituted in place of FOR UPDATE. In addition, if the first
character of text is $, then the remaining characters of text are placed at
the end of the SELECT statement rather than after the filename. This
allows for different variations of SQL to be supported.
"IND=" Identifies a column that contains a sequential number starting at
0. This is used to emulate an indexed file.
"IOPROG=" Emulates the embedded I/O program logic available with a true
ProvideX file.
"KEY=" Identifies fields that make up the key(s). For named keys enter
*NAME:keyname; e.g.,
OPEN(chan)"[OCI]sid;table;KEY=field,field,*NAME:keyname"
Use the :D option to indicate that the key segment is to be sorted
in descending order; e.g., KEY=KeyFld1,KeyFld2:D,KeyFld3.
"KEYDATA=" Identifies a column that represents the key. This is used to
emulate an external key where the data is not duplicated in data.
"MAS90DATE" Reformats the contents of a date column to and from the Sage
MAS 90 date format.
"MAS90SET" Sets flags for Sage MAS 90 emulation, such as turning on the
MAS90DATE conversion.
"NONUMADJ=" Set to 1, Y or y to suppress +3 adjustment for defined length of
numerics. (INI supported)
"NONULLS=" Inserts zero-length strings rather than nulls into the target database, and
does not generate WHERE clauses checking for IS NULL or IS NOT
NULL. (INI supported) Set to 1, Y or y to enable or 0, N or n to
disable. If the application does not work correctly when moving
from Version 5 or lower, then set NONULLS=P to indicate that
keys are handled the same as pre-Version 6.
"NOSTRIP" Keeps trailing spaces (Default).
"NULLPADKEY" Forces keys to be padded to full length with null character, $00$. (INI
supported) When used in an INI file, set NULLPADKEY=1, Y or y.
"ORACLE=" Indicates if the database uses ORACLE SQL sequence (either Y or
N). (INI supported) If ORACLE= and TOP= are used, then SELECT
commands are generated as SELECT * FROM (SELECT * FROM
TABLE) WHERE ROWNUM < 1. Default is Y.
"PREPARE=" Set to 1, Y or y to use prepared statements. (INI supported)
Prepared statements are pre-compiled SQL that may improve
performance. Default is N.
"PSWD=" Specifies password. (INI supported, but not secure. Anyone with
access to the INI will be able to read this password.)
"REC=" Provides the column names, type, and size. This is typically done to
improve performance. If this information is not provided, then
ProvideX must query the database for this information. For more
information see ODB/OCI/DB2 Record Processing, p.783.
"RECDATA=" Identifies a column to return as full record. This can be used for
variant records that use complex rules to identify the record type.
"SHARED" Sets all tables to share a single connection to the Oracle database
(Default).
"STDDATE" Overrides the above formatting on individual columns.
"STRIP" Removes trailing spaces from fields
"TEXTMAX=" Overrides maximum size for text fields (default is 4096 bytes).
(INI supported)
"TOP=" Specifies use of the TOP clause in SELECT statements (limits the
number of rows to return in a result set). (INI supported) If TOP=n is
non-zero, then the KEF( ) / KEL( ) functions issue a SELECT where the
row number is <= n, which improves system performance. If TOP=n >
0, then PVX issues SELECT TOP n to reduce the data transferred.
TOP=-1 indicates the driver supports SELECT TOP, but normal
reading should not use it. Default is 0 (TOP not supported).
"TSQL=" Not applicable to Oracle at this time.
"TYP=" Sets identifier for different variant records. For more information
see ODB/OCI/DB2 Record Processing, p.783.
"UNIQUE" Sets new opens to be on a unique connection to the database.
(INI supported) When used in an INI file, set UNIQUE=1, Y or y.
UNIQUE=0, N or n indicates a shared connection.
"USER=" Specifies login name. (INI supported)
It is a good idea to include the field descriptions for all fields since this prevents ProvideX
from having to read the table's data dictionary to determine field sizes and types.
Hex and Binary values can be used to store non-printable and/or binary data that
would cause problems otherwise when passed in a SQL statement.
Binary fields (type P) can be used to define numeric data that has been packed into a
string using the BIN( ) and DEC( ) functions. If specified, the scale indicates the
number of implied decimal places that the value contains.
Literals may be inserted within the record layout in order to insert padding where a
field or column is not presently used, but space has been reserved for it. Literals
should be enclosed with apostrophes and separated by a comma or plus sign.
Note: The [ODB] tag is built into the ProvideX programming language. You do not need
the ProvideX ODBC driver to use this tag, but you are limited to using the tag in Windows
only. (ODBC is the Microsoft acronym for Open Database Connectivity.)
Description The [ODB] tag is used as a prefix in an OPEN statement to denote that ProvideX is to
route all file I/O requests to an external ODBC database. Once you open a channel
for [ODB] use, you can use it just like any other channel (i.e., for file I/O). It remains
open until you close it.
ProvideX supports ODBC under Windows as well as two open source versions of
ODBC for UNIX/Linux (iODBC and unixODBC). Use TCB(197) to determine if
ODBC support is enabled for a given UNIX/Linux system.
Note: To open and read ProvideX (internal) data files using other database applications,
(e.g., Excel), install and use the ProvideX ODBC driver instead of the [ODB] tag.
On the first use of an [ODB] tag under UNIX/Linux, ProvideX will first attempt to
load the unixODBC shared library, libodbc.so. If that load fails, ProvideX will
attempt to load the share library for ODBC, libiodbc.so. If that fails, an Error
#15: Operating system command failed is reported.
Two packed century formats are also supported. The first format, AA, maps
A to 2000. Our example of March 1, 2004 with DATEFMT=AAMMDD would be
returned as A40301. The second format, KK, is similar except K maps to
2000. A DATEFMT=KKMMDD would return K40301 for the example.
"DB=" or Qualifies the specific database that you wish to use when using a
"QUALIFIER=" driver to service multiple databases. (INI supported)
"DEBUGIT=" String to append to SQL statement along with program name and line
number for debugging purposes. (INI supported) This must indicate
the comment character(s) appropriate to the database. For example,
"--" is the comment identifier for Microsoft SQL Server; anything after
"--" is ignored by SQL Server when compiling the SQL statement.
"EXEC_SPRNO=" Name of stored procedure used to emulate RNO( ) function. You
must create a stored procedure for each table and key that an
RNO is need for. Format: spRNOtablename_keynumber.
"EXTROPT=" Controls the format of the SELECT statement used to process an
EXTRACT. (INI supported) By default, PVX generates a SELECT *
FROM table FOR UPDATE WHERE...
When EXTROPT=text, then text is substituted in place of FOR
UPDATE. In addition, if the first character of text is $, then the
remaining characters of text are placed at the end of the SELECT
statement rather than after the filename. This allows for different
variations of SQL to be supported.
"FACTSDT=" Causes all date fields to be translated to / from the SQL date
format to the format used by the FACTS application.
"IND=" Identifies a column that contains a sequential number starting at
0. This is used to emulate an indexed file.
"IGNORE_NODATA=" Set to 1 (Y or y) to ignore SQL_NO_DATA error. If set to 0 (N or n),
ProvideX will report Error #11: Record not found or
Duplicate key on write if it receives a SQL_NO_DATA
error when executing a direct SQL statement. Default is 1.
"ISOLATION=" Controls the isolation that this connection will have relative to
other processes on the same database. In particular, it controls
Dirty reads (reading data that may be rolled back),
Non-Repeatable reads (reading data after being changed by other
transactions), and Phantom reads (reading data newly added to
file). (INI supported)
Settings include: UNCOMMITED (D, R, P possible), COMMITED (D
possible, R & P not possible), REPEATABLE (P possible, D & R not
possible), SERIAL (D, R, & P not possible).
"KEY=" Identifies fields that make up the key(s). For named keys enter
*NAME:keyname; e.g.,
OPEN(chan)"[ODB]dsn;table;KEY=field,field,*NAME:keyname"
Use the :D option to indicate that the key segment is to be sorted
in descending order; e.g., KEY=KeyFld1,KeyFld2:D,KeyFld3.
"SHARED" Sets all tables to share a single connection to the Oracle database.
Default.
"SCHEMA=" Sets the Schema name to be prefixed to the table name (separated
with a dot); e.g., MySchema.MyTable.
"STDDATE" Overrides the above formatting on individual columns.
"STRIP" Removes trailing spaces from fields
"TEXTMAX=" Overrides maximum size for text fields (default is 4096 bytes).
(INI supported)
"TIMEOUT=" Defines the time out value for any SQL operation (time before
error 0 returned). (INI supported)
"TOP=" Specifies use of the TOP clause in SELECT statements (limits the
number of rows to return in a result set). (INI supported) If TOP=n is
non-zero , then the KEF( ) / KEL( ) functions issue a SELECT TOP
1... SQL statement, which improves system performance. If TOP=n
> 0, then PVX issues SELECT TOP n to reduce the data transferred.
TOP=-1 indicates the driver supports SELECT TOP, but normal
reading should not use it. Default is 0 (TOP not supported).
"TSQL=" Defines a SQL statement that is used to control what data the
logical file returns.
"TYP=" Sets identifier for different variant records. For more information
see ODB/OCI/DB2 Record Processing, p.783.
"UNIQUE" Sets new opens to be on a unique connection to the database.
(INI supported) When used in an INI file, set UNIQUE=1, Y or y.
UNIQUE=0, N or n indicates a shared connection.
"USER=" Specifies login name. (INI supported)
Example To read Windows ODBC databases from a UNIX server, you would install and use
WindX to make the connection or use ProvideX RPC on a Windows Server and open
your ODBC databases through that server:
OPEN (14)"[WDX][ODB]datasourcename"
Where:
[RPC:server] The RPC clause that initiates the remote CALL. server is the logical
server name (see below).
chan Channel or logical file number to open.
;entry Entry point label. (Optional.) If you include a label, precede it with
a semicolon and append it to your subprogram name.
filename Name of the file to open prefixed by [RPC:server]. Use a string literal
as in OPEN (14)"[RPC:server]my_file"
fileopt File options. Supported options include:
BSZ=num Buffer size (in bytes)
ERR=stmtref Error transfer
IOL=iolref Default IOList
ISZ=num Open file in binary mode
NBF=num Dedicated number of buffers
OPT=char$ File open options
REC=string$ Record prefix (REC=VIS(string$) can also be used).
arglist One or more arguments (comma-separated if you include a list
arg,arg...) to pass to the subprogram. Optional.
server Name to be associated with a program server. Established using
the PROCESS SERVER Directive, p.254.
stmtref Program line number or label to transfer control to.
subprog Subprogram for the CALL directive; e.g.,
CALL "[RPC:INVENTORY]inv_alloc",a$,b,c,d
varlist One or more variables, literals, mnemonics, IOL= options, and/or
location functions; e.g., "@(5,4)". If you include a list, items
must be comma-separated.
Description The [RPC] tag is used as a prefix to denote that ProvideX is to CALL a subprogram or
open a file that resides on a remote server. Before a remote process control can be
initiated, the server must be identified, and the server name established, via the
PROCESS SERVER Directive, p.254.
Note: This feature requires ProvideX RPC activation. Refer to the ProvideX website
for licensing information.
Description The [TCP] tag is used as a prefix in an OPEN statement to denote that ProvideX is to
open the channel for a TCP/IP connection.
The TCP interface in ProvideX acts like a "smart" two-way communications pipe. A
ProvideX TCP connection can be either a Server or Client-style connection; these are
explained in the following sections. A single program can have many TCP sockets
opened concurrently, with each independent of the others. However, there are
operating system limitations. For more information, see System Limits, p.819.
prog;function Parameters for the [tag]. For instance, for [DDE] to export to
Excel, you can open a worksheet using either,
"[WDX][DDE]EXCEL;existing_worksheet.WK1" or
"[WDX][DDE]EXCEL;"
In the first example, where a spreadsheet name is included, it
must exist on the client PC.
tag ProvideX special command file tag. (All are listed in this chapter);
e.g., [DDE], [DLL], etc.
settings$ Serial device's attributes (baud rate, etc.). String expression.
statement Command supported by ProvideX (some are not) for use with
EXECUTE or INVOKE + the [WDX] tag in WindX. String expression.
subprog Subprogram for the CALL directive.
Note: This feature requires a WindX activation. Refer to the ProvideX website for
licensing information.
Description The [WDX] tag is used as a prefix to perform an action on a remote client machine (if
your given command could be used on either client or server, and if the command
supports using [WDX]). The [WDX] tag can only be used in specialty commands when
running under WindX in a client-server environment.
WindX supports the use of the following commands via the [WDX] tag: SERIAL,
KEYED, DIRECT, SORT, PROGRAM, DIRECTORY, REFILE, LOCK, UNLOCK,
MNEMONIC and ERASE.
Note: If you are running an earlier version of ProvideX on a WindX PC, you must
encapsulate these commands in an EXECUTE "[WDX]..." or design your applications
to run on the remote site. Also, the DIR= option and the PURGE, FILE and INDEXED
directives are not supported by WindX and must be encapsulated in an EXECUTE etc.
To Detect WindX
To detect whether or not you're actually working on a WindX PC in Command mode, look
for the special prompt -} ... i.e., a hyphen with curly brace. In your applications, a test for
one of the following indicators will tell you that your session is running under WindX:
DEC(MID(MSE, 22,1))>0
TCB(88)<>0
For more information, refer to the TCB( ) Function, p.530, and the MSE System
Variable, p.561.
You can create a global variable in your WindX setup, and use it later to test for the
presence of a WindX client PC connection; then, if WindX is running the session, you
can use the [WDX] tag. In the following example, the user-defined variable %WDX
below is only set when WindX is running, otherwise its value is null:
IF MID(MSE,22,1)>$00$ AND MID(MSE,22,1)<$FF$ THEN %WDX$="[WDX]"
GUI Requests
Once the ProvideX session on the server recognizes the terminal as a WindX station,
it changes the internal settings to allow graphical requests to be routed correctly.
(Then, graphical requests are automatically tokenized and forwarded to WindX for
processing. That is, you do not need the [WDX] tag.)
For instance, a server command to print a picture in a UNIX environment would
automatically be sent to WindX for the client. ProvideX transmits standard
mnemonics to WindX as an escape ($1B$) followed by the mnemonic in native form.
Traffic from the host/server is minimized because the WindX client's ProvideX
interpreter handles a lot of the functionality locally (on the client) for screen
refreshing and graphical requests.
In WindX, your instruction to print is sent to the client, bundled as is. When you use
mnemonics and/or graphics like .bmp’s, they must exist on the client or be accessible to
the client. The following example uses a 'PICTURE' that is defined and shared on a
common Windows server instead of being stored on each individual client machine:
print 'picture'(10,10,10,10),"\\serv_name\driveshare\your_bmps\that.bmp"
Use a similar format to open a COM port for direct access to a serial device (e.g., ,a
serial printer or weigh scale) on the client PC without going through a spooler,
LET SETTING$="9600,n,8,1,x"
OPEN (5,OPT=SETTING$)"[WDX]COM2"
or
OPEN (5,OPT="9600,n,8,1,x",ERR=BADCOM)"[WDX]COM2"
Event handling is not supported across a remote connection. Event mapping must
occur within the remote object. The remote object will not have access to any server
resources. At most, the remote event could pass a CTL back to the local server for
action. It is recommended that objects requiring event processing exist completely on
the remote and interact only with the local WindX session on the remote.
Appendix
Overview
Overview BMK
This appendix discusses additional features of the ProvideX language, such as file
options, labels, operators, and control codes. It also includes supplementary information
regarding preset system limits, error messages, and reserved words. Section headings,
page numbers, and outlines are listed below:
Input/Output and Control Options, p.804
Various options that can be included in a directive or system function to fine tune
code and redirect processing.
Data Format Masks, p.807
Character string masks used to define data (input/output) in ProvideX.
Labels/Logical Statement References, p.810
Built-in line labels that can be used instead of line number references in
applications.
Negative CTL Definitions, p.811
Actions that are assigned to negative CTL values, and have special significance to
ProvideX.
Operators, p.815
All operators that can be used in ProvideX, including: property, assignment,
auto-increment/decrement, LIKE, and the Apostrophe Operator, p.817.
System Limits, p.819
Preset system limits of ProvideX.
Reserved Words, p.821
Words that are reserved for internal use by ProvideX.
Error Codes and Messages, p.822
The numeric system variable ERR, error codes, and the messages associated with
errors detected by ProvideX.
Several directives and system functions described in this document include the use
of optional syntax elements in their formats to fine tune code and redirect processing.
Some are defined individually, and some are listed in format groups: Control
Options (ctrlopt) or File Options (fileopt). A general overview of available options
is provided below. Refer to specific directive/function descriptions for information on
the use of these options.
File Options File options (fileopt) can be included in the syntax for Accessing Data Files, p.22.
These may be used to handle exceptions, set key position, and deal with data errors in
I/O operations:
BSY=stmtref To trap Error #0: Record/file busy.
BSZ=num Buffer size (in bytes) for file opens and directives that control data
flow. Block size (in KB) for file creation directives (CREATE TABLE,
KEYED, etc.).
DIR=num Direction indicator. This adjusts the record pointer by num
records, where a positive value advances the pointer, a negative
pointer reverses the pointer, and a DIR=0 indicates no
movement. This option is not supported with use of the [WDX] tag.
DOM=stmtref On missing record, transfer to program line number/line label.
END=stmtref On end of file, transfer to program line number/line label.
ERR=stmtref On error, transfer to program line number/line label.
HLP=string$ Help message identifier used with INPUT and OBTAIN.
IND=num 32-bit record index value used to uniquely identify a record in
keyed files.
For Fixed length keyed files, num represents an offset into the
data file (first record has an index of 0, second is 1, and so on).
However, some record indexes will be set aside by the system
to be used for key tables and may yield gaps where the record
indexes have been used for keys.
For Variable length keyed files, num represents a logical page
address and record index within that page. The page address is
contained in the top 24-bits (high order 3 bytes) with a record
index within that page in the lower 8 bits. For VLR files, the page
address is the actual physical address for the data page. For EFF
files, the page address is a logical page number in the file.
For TCP/IP server files, num represents an internal socket
connection to the client that can be used to manually direct
output to specific sockets.
Used with the INPUT directive, IND=num sets the starting
position (column number) of the cursor in the input field.
Control Options
Control options (ctrlopt) can be included in the syntax for creating and maintaining
various Graphical Control Objects, p.21.
ERR=stmtref On error, transfer to program line number/line label.
HLP=string$ Help message identifier for defining AutoComplete, p.217.
FNT="font,size[,attr]" Font name, size, optional attributes Refer to the 'FONT'
Mnemonic, p.605, for details.
FMT=def$|mask$ Format definition for the associated control. If used for
character string masks, see Data Format Masks, p.807.
KEY=char$ Hot key
LEN=num Maximum input characters.
MSG=text$ Message line.
MNU=ctl CTL value associated with right-click menu event.
A format mask is a character string that can be used to define how data is to be
displayed or printed in ProvideX (PRINT Directive, p.251). Masks can also be
applied to filter data being received from the keyboard (INPUT Directive, p.159) or
in the conversion/validation of a string (STR( ) Function, p.521).
For further information, see Basic Input/Output, p.87 in the User’s Guide.
Format Defaults
If no format mask is specified when outputting numeric values, the system formats
the value as follows:
• The first character output will indicate the sign of the value. A space will be output
if positive, a minus sign if negative.
• If the absolute value is greater than 10E+18 or is less than 10E-18 (but not zero), the
value is output using scientific notation.
• The number is rounded to the current precision in effect and output suppressing
all leading zeroes and all trailing zeroes following the decimal point. The decimal
point is suppressed if no digits remain after it.
For example, assuming precision of two:
->0010 PRINT 3/2, 6/3, 3-4, 2/3
1.5 2-1 .67
Before being output, the number is rounded to the number of decimal places
specified in the format mask. If no sign indication is specified (i.e., no -, +, (, ), CR, or
DR in mask), no sign will be output.
The following table shows the results of various masks used on different values:
Character Description
0 Zero. String must contain either a digit (0-9) in this position.
String must contain an alphabetic letter (A-Z, a-z) in this position.
A
The output of the format mask is converted to uppercase.
a String must contain an alphabetic letter (A-Z, a-z) in this position.
String can contain any character in this position. The output of the
X
format mask is converted to Upper case.
x String can contain any character in this position.
String must contain an alphabetic letter (A-Z, a-z) or a digit (0-9) in
Z this position. The output of the format mask is converted to Upper
case.
String must contain an alphabetic letter (A-Z, a-z) or a digit (0-9) in
z
this position.
A numeric value surrounded by parenthesis may be used to specify
(nn) a repeat count for the preceding format character. For example
AAAAA may also be specified as A(5).
other Outputs the character.
ProvideX supports the use of logical statement references (line labels) in lieu of
actual line number/label references in your applications. ProvideX supplies a set of
built-in labels (keywords, with leading asterisks) that can be used wherever you
would use a statement reference. Note that some of the logical line labels and the
directives they emulate will remove an item from your stack and perform a RESET.
The following logical statement references are supported in ProvideX:
*BREAK Emulates BREAK Immediate Exit of Loop, p.33.
*CONTINUE Emulates CONTINUE Initiates Next Iteration of Loop, p.56.
*END Emulates END Halt Program Execution, p.112.
*ESCAPE Emulates ESCAPE Interrupt Program Execution, p.121.
*NEXT Goes to the beginning of the next line/statement.
*PROCEED Continues to the next statement in a compound statement or to the
beginning of the next line.
*RETRY Emulates RETRY Re-Execute Failing Instruction, p.286.
*RETURN Emulates RETURN Subroutine/Function Return, p.287.
*SAME Goes to the start of current line/statement.
Note: In earlier versions of ProvideX, the *CONTINUE and *BREAK labels and the
corresponding directives were not supported for use with SELECT / NEXT RECORD
directives. BREAK and *BREAK commands can now be used in SELECT structures.
ProvideX normally handles all negative CTL values internally. Values are used as follows:
-1 to -999 used by the input handler to save current instructions,
internally call "*CONTROL"
-1000 to -1999 for input editing control keys and mouse interaction
-2000 to -2255 for composite character generation
Note: CTL values less than -32001 or greater than 32001 are reserved for internal use.
Please do not use CTL values in these ranges.
Operators
Operators
This section describes the traditional operators (e.g., + - * /) you can use in ProvideX,
along with other operators for which support has been added in recent versions
(e.g., the auto-increment and decrement operators, assignment operators, the LIKE
Operator, and the Apostrophe Operator).
Arithmetic Operators
The following operators are used to perform calculations.
+ Addition. Where A + B adds A to B.
– Subtraction. Where A - B subtracts B from A.
* Multiplication. Where A * B multiplies A by B.
/ Division. Where A / B divides A by B.
^ Raise to. Where A ^ B raises A to the power of B (** is equivalent to ^).
| Modulus. Where A | B divides A's remainder by B.
In addition to the arithmetic operators, there are increment and decrement features:
++ Auto-increment by 1 (pre-increment when prefixed to variable name,
post-increment if suffixed); e.g., ++var1 or var1++.
–– Auto-decrement by 1 (pre-decrement when prefixed to variable name,
post-decrement if suffixed); e.g.,--var1 or var1--.
Note: <>, <=, and >= can be entered as ><, =<, and => respectively.
Assignment Operators
The following assignment operators are included in the general syntax of the
language:
+= Add to. Can be used with numerics or strings:
Numeric example: A+=1 is the same as A=A+1.
String example: A$+="G" is the same as A$=A$+"G".
–= Subtract from. Not valid for strings.
Numeric only: B-=A+1 is the same as B=B-(A+1).
*= Multiply by. Can be used with numerics or strings.
Numeric example: B*=A+1 is the same as B=B*(A+1)
String example: A$*=5 is the same as A$=A$+A$+A$+A$+A$.
/= Divide by. Not valid with strings.
Numeric only: B/=A+1 is the same as B=B/(A+1).
^= Exponentiation. Raise to. Not valid with strings.
Numeric only: B^=A is the same as B=B^A.
|= Modulus / remainder from division. Not valid with strings.
Numeric only: B|=A is the same as B=MOD(B,A)
LIKE Operator
Use the LIKE operator for string comparisons. The ProvideX default is to take the
string expression on the left and compare it to the string mask on the right. You can
apply all the regular expression rules of the MSK( ) Function, p.482; e.g.,
IF A$ LIKE mask THEN ..
is the same as ...
IF MSK(A$, mask)<> 0 THEN ..
This operator may be used in conditionsl structures, such as IF..THEN..ELSE,
REPEAT..UNTIL, and WHILE..WEND.
To make conversions from Thoroughbred easier, set the 'TL' parameter to ON. With the
'TL' parameter set, the LIKE operator emulates the Thoroughbred matching of
patterns. For more information, refer to the 'TL' System Parameter, p.685.
Apostrophe Operator
The apostrophe operator is used to assign, retrieve, list, and make dynamic changes
to a given control or object's properties. For full details on the syntax and use of the
apostrophe, refer to the Apostrophe Operator in the next section.
Apostrophe Operator
Apostrophe Operator
Examples The first example creates a multi-line control, displays the properties available,
changes the column width, and returns the current screen coordinates.
->multi_line 100,@(10,12,40,1)
->LET X=100
->PRINT X'*
Auto,BackColour,Col,Cols,CtlName,Enabled,Eom,Fmt,Focus,Font,Height,hWnd,
ImpliedDecimal,Key,Left,Len,Line,Lines,Lock,MenuCtl,Msg,Nul,OnFocusCtl,
Parent,Scroll,SelectLength,SelectOffset,SelectText,Sep,SignalOnExit,
TextColour,Tip,Top,Uppercase,Value,Visible,Width,
->LET X'Cols=50 ! Make control 50 columns wide
->PRINT X'Col,X'Line ! Current screen coordinates of the multi-line
10 12
->
The following example creates a grid containing 10 columns and 5 rows, then selects
column two, row zero (which selects the entire column). Changing the value of the
property sets the contents of all the selected cells to that value.
->GRID 10,@(10,10,40,5)
->Y=10
->Y'ColumnsWide=10
->Y'RowsHigh=5
->Y'Column=2
->Y'Row=0
->Y'Value$="New Data"
This dynamically changes a property in one object based on the value of another:
IF Country.ctl’value$ = "CDN" \
THEN Zip'Fmt$="A0A 0A0" \
ELSE Zip'Fmt$="00000"
The following is a simple COM interface example that instantiates an Internet
Explorer object, then displays the PVX website:
DEF OBJECT IE, @(10,10,40,20)="Shell.Explorer"
IE’Navigate2('www.pvx.com')
The following OOP example assumes the definition of a "Customer" object:
System Limits
SystemLimits
This section lists ProvideX system limits (subject to operating system constraints on
memory and resources). There is also a general limit of 2GB on all data storage.
The following are preset limits for all ProvideX programs:
For ProvideX Basic Programs Limit Notes
Array (32-bit platforms), max elements (millions) 10
Array, dimensions 3
Entire length includes path
Command line (32-bit platforms), max characters 32767
+ all parameters, arguments.
Includes path, program
Command line (32-bit platforms), max arguments 128
name + all arguments.
COM interface method calls, max arguments 20
Directory name, max characters 260
File name, max characters 511 Includes path + file name.
Line number, highest 64999
Line label, max characters 127
... or the maximum the OS
Memory, max GB 2
allows, whichever smaller.
Mnemonics, max characters (billion) 2 String length for data
Precision, digits of accuracy 18 The default is 2.
Includes path + file name
Program name (arguments), max characters 2044 + line label + data.
... or the maximum the OS
Program size (32-bit platforms), max GB 2
allows, whichever smaller.
Record limit, default max bytes 10240
Statement length, max in KB 24
Statement length (console editing), max in KB 4
Refer to Internal
String size, max GB 2
Limitations below.
TCP sockets (UNIX), max connections 65535
TCP sockets (Windows Server), max connections 65535
TCP/IP address, max characters 60
Variable name, max characters 127
Values < 2000 reserved for
WebServer port, highest port number 65535
standard Internet activities
Window character limit Max. 225 for lines.
255
Max. 255 for columns.
Internal Limitations
With this increased string limit a few internal logical limitations have been imposed
to avoid passing excessively long strings to some of the system functions. The
following functions/directives are restricted to 8kb string lengths:
• CALL subprogram names/entry point names.
• LIST_BOX LOAD for a single line.
• SYSTEM_HELP command.
• STR( ) function format masks.
• SYS( ) function system command.
• XEQ( ) pathname.
• EVS( )/EVN( ) expressions.
• MSK( ) mask definition.
• DAY_FORMAT and DTE( ) formats.
Reserved Words
Res rvedWords
This words on this list are reserved for internal use by ProvideX. Do not use them as
variable names.
ABS DISABLE HIDE MID QUO SSZ
ACCEPT DLL HLP MIN RADIO_BUTTON START
ACS DLM HSA MNEMONIC RANDOM STEP
ADD DLX HSH MNM RANDOMIZE STK
ADDR DOM HTA MNU RCD STOP
ALL DROP HWD MOD RDX STP
AND DROP_BOX HWN MSE READ STR
ARG DSK H_SCROLLBAR MSG REC SUB
ASC DSZ I3E MSGBOX RECORD SWAP
ASN DTE I86 MSK REFILE SWITCH
ATH DUMP IF MSL RELEASE SWP
ATN EDIT IND MULTI_LINE REM SYS
AUTO ELSE INDEX MULTI_MEDIA REMOVE SYSTEM_HELP
AUTO_LOCK ENABLE INDEXED MXC RENAME SYSTEM_JRNL
BEGIN END INPUT MXL RENUMBER TABLE
BIN ENDTRACE INT NAR REPEAT TAN
BKG END_IF INVOKE NBF RESET TBL
BREAK ENTER IOL NEXT RESTORE TCB
BSY ENV IOLIST NID RET THEN
BSZ EOM IOR NOT RETRY TIM
BUTTON EPT ISZ NUL RETURN TIP
BYE ERASE JUL NUM RND TME
CALL ERR KEC OBJ RNO TMR
CASE ERROR_HANDLER KEF OBJECT ROUND TMS
CHART ERS KEL OBTAIN RSZ TO
CHECK_BOX ESC KEN OFF RTY TRANSLATE
CHG ESCAPE KEP ON RUN TRISTATE_BOX
CHN EVN KEY OPEN SAME TRX
CHR EVS KEYED OPT SAVE TSK
CLEAR EXCEPT KGN OR SCALL TSM
CLIP_BOARD EXECUTE KNO OWN SECURITY_MASK TXH
CLOSE EXIT LAOD PAD SELECT TXW
CONTINUE EXP LCS PASSWORD SEP UCS
CONTROL EXTRACT LEN PCK SERIAL UID
COS FFN LET PERFORM SERVER UNLOCK
CPL FI LFA PFX SETCTL UNT
CRC FIB LFO PGM SETDAY UNTIL
CREATE FID LIKE PGN SETDEV UPK
CSE FILE LINE_SWITCH POINT SETDRIVE USER_LEX
CTL FIN LIP POP SETERR VAL
CUSTOM_VBX FIND LIST POPUP_MENU SETESC VARDROP_BOX
CVS FLG LIST_BOX POS SETFID VARLIST_BOX
CWDIR FLOATING LOAD PRC SETMOUSE VIA
DATA FMT LOCAL PRECISION SETTIME VIDEO_PALETTE
DAY FN LOCK PREFIX SETTRACE VIN
DAY_FORMAT FNT LOG PREINPUT SET_FOCUS VIS
DEC FOR LONG_FORM PRINT SET_NBF V_SCROLLBAR
DEF FPT LPG PRM SET_PARAM WAIT
DEFAULT FROM LRC PROCEED SGN WEND
DEFCTL GAP LSIT PROCESS SHORT_FORM WHERE
DEFPRT GBL LST PROGRAM SHOW WHILE
DEFTTY GEP LWD PROPERTIES SID WHO
DELETE GET_FILE_BOX MAX PROPERTY SIN WINDOW
DICTIONARY GFN MDE PSZ SIZ WINPRT_SETUP
DIM GID MEM PTH SORT WRITE
DIR GO MENU_BAR PUB SQR XEQ
DIRECT GRID MERGE PURGE SRT XFA
DIRECTORY HFN MESSAGE_LIB QUIT SSN XOR
Note: The hyperlist above is linked to the complete list of error codes. The error and warning
messages are explained in further detail on the following pages.
Whenever ProvideX encounters an error, it sets the ERR System Variable, p.556, to an
error code (an integer). The associated error message indicates the type of error.
ERR values greater than 255 indicate operating system errors. In these cases,
ProvideX returns the value of the operating system's error code (integer) plus 256.
Use the MSG( ) Function, p.480, to obtain the error message that is associated with
the number:
->?msg(4)
Error #4: Device not ready
This section provides a numerically arranged list of all the current error codes and
their meanings.
HG !,’!9’exclamation
’4D’ mnemonic 582
point 25
US /: , orcolon
\ slashes (forward or back) 26
26
application, See program
arc-cosine, ACS( ) function 389
VT -:; semicolon
-> -} prompts 26 arc-sine, ASN( ) function 393
arc-tangent, ATN( ) function 395
WU ? question mark 25
26 'ARC' mnemonic 582
XV @X( ) / @Y( ) functions,
'@@' mnemonic 581
return
arguments 19, 40
ARG( ) function, in command-line 391
YW coordinates 386–387 CALL directive, transferred to subprogram 40
ENTER directive, in subprogram 118
, apostrophe 25, 817
ZX ’’@@’ define cursor position sequence 581 NAR system variable, number at startup 563
system limits 819
'1U' parameter 651
Y '2D' mnemonic 581 See also parameters, syntax, variables
arithmetic, See math
Z '3D' mnemonic 582 arrays
IH ATN(
bookmarks in PDF 623, 741
'AT' mnemonic 583
'BOX' mnemonic 588
) function, return arc-tangent 395
J I attributes,objects
See Keyed files, graphical control
branching
CASE directive, define branch points 42
J
K Auto Complete 217, 705 DEFAULT directive, branch if no CASE 76
END SWITCH directive, end branching 114
LK AUTO directive, automatic line generation 31
’AW’ parameter 652
SWITCH directive, branch control 327
BREAK directive, immediate exit of loop 33
ML 'BR' mnemonic 588
WU 'BG'
'BF' parameter 653
mnemonic 585 C
XV 'BI' mnemonic 586
binary 337, 561, 576
’*C’ mnemonic 590
'Cn' mnemonic 590
YW BIN( ) function, binary from numeric 396 Calendar 707
DEC( ) function, get binary of string 410 Calendar button 218
ZX NOT( ) function, invert string bits 486 call
POS( ) function, scan string 498
Y SWP( ) function, swap data 524 CALL directive, transfer to subprogram 40
program to call on close 645
Z test for serial files 653 STK( ) function, stack 518
XEQ( ) function, inline to subprogram 547 NAR system variable, argument number 563
@@ 'CAPTION' mnemonic 590 system limits 819
CASE directive, define branch points 42 Command mode 19, 31, 683
AA ’CD’ parameter 654 display errors in 660
BB ’CE’ mnemonic 591
'CE' parameter 654
prompt 19, 677, 679
commands
CC 'CF' mnemonic 591 See directives
INVOKE directive, execute OS command 162
DD 'CF' parameter 654
channels xiv, 22, 820
send OS command string 630
special command tags 763–800
EE character display SYS( ) function, invoke OS command 525
mnemonics 580
FF See also text
comments
exclamation point (!) 25
G CHART directive, control chart 43 REM directive, remark 276
HG
object properties 700 compatibility, See language, conversion
CHECK_BOX directive, control check box 47, compiled format
IH
49–52 CPL( ) function, compile string 403
object properties 700 LIST directive, convert statements 176
JI CHG( ) function, if variable changed 398
'CH' mnemonic 591
LST( ) function, convert statements 473
PGM( ) function, return program line 496
KJ CHN system variable, channels open 552
'CH' parameter 655
See program
Component Object Model (COM) 817, 819
LK CHR( ) function, ASCII character of value 399 DEF OBJECT directive, define object 70
ML ’CI’ mnemonic 591
’CI’ parameter 655
DELETE OBJECT directive 83
ON EVENT directive, COM event
NM 'CIRCLE' mnemonic 592
clear
processing 227
compress data 400, 543
ON BEGIN directive 32 See also Zlib
console
PO CLEAR directive, reset variables 53, 86
cursor to EOL 592 input/output 175
QP data from chart 43
data from file, PURGE directive 259
CONTINUE directive, next iteration of loop 56
control object properties 697–730
RQ data from file, REFILE directive 274
input type-ahead buffer 591
apostrophe operator 817
compound properties 724
S screen 594 drag and drop (grid) 727
TR text from cursor 591
client-server, See networks
loading by row (grid) 728
load on demand (list boxes) 725
US CLIP_BOARD directive, Windows clipboard 54 multiple selections (lists and grids) 726
multi-property access 724
VT
’CL’ mnemonic 592
CLOSE directive, close file 55 state indicators (tree view list boxes) 727
See also graphical control objects, Graphical
WU output on close 590
program to call on close 645 User Interface
control options 804
XV CMP( ) function, compress data 400
colon (:) 26 conventions
YW ’COLOR’ & ’_COLOR’ mnemonics 592 in this documentation xiv
universal naming convention (UNC) 413,
’COLOUR’ & ’_COLOUR’ mnemonics 592
ZX columns
417, 751, 755
conversion
MXC( ) function, maximum in file 484
Y command line
accent conversion table 73
ASCII to Radix-40, RDX( ) function 505
Z ARG( ) function, return argument 391 character sets, TRANSLATE directive 337
HG
COS( ) function, return cosine 402 buffers 654
cosine date table 66, 69, 73
IH ACS( ) function, return arc-cosine 389
COS( ) function, return cosine 402
DAY_FORMAT directive, format for DAY 63
DAY system variable, current date 553
JI 'CPI' mnemonic 593
CPL( ) function, compile string 403
define date table 66, 69, 73
DTE( ) function, convert date 418
KJ 'CP' mnemonic 593 JUL( ) function, Julian date 459
MAS 90 date format 693
LK CRC( ) function, cyclic-redundancy-check 404
CREATE TABLE directive, create EFF file 57 SETDAY directive, change local date 304
[DB2] special command tag 764–768
ML 'CR' mnemonic 594
CSE( ) function 405
’DB’ parameter 656
NM CSE( ) function, case compare 405
’DC’ mnemonic 595
'DC' parameter 657
ON ’CS’ mnemonic 594
'CS' parameter 656
[DDE] special command tag 770
’DD’ parameter 657
PO CTL
CTL( ) function, return CTL definition 406
debugging 121, 313, 464
QP CTL system variable, end input code 553 See also error handling
DEC( ) function, get binary of string 410
DEFCTL directive, define CTL values 77
RQ negative CTL definitions 811 decryption value, HSH( ) function 447
DEFAULT directive, branch if no case 76
S PREINPUT directive, prime input queue 250
TR
SET_FOCUS directive, set input focus 300 'DEFAULT' mnemonic 596
SETCTL directive, GOSUB on CTL event 303 DEF CLASS directive, define object class 64
US
See also graphical control objects DEF CTL directive, define control signal 75
'CT' parameter 656 DEFCTL directive, define CTL values 77
VT ctrlopt, control options 804
CUI (Character User Interface)
DEF CVS directive, define accent table 73
DEF DTE directive, define date table 73
WU See character display, text mode DEF EOM directive, define EOM character 75
'CU' parameter 656 DEF ERR directive, define system error value 75
XV cursor 588, 590–592, 595, 598 DEF FN directive, define function 67
YW ’CURSOR’ mnemonic 594
motion mnemonics 578
DEF GID directive, define UNIX group ID 66
definiton mnemonics 577
ZX See also prompts, mouse
CUSTOM_VBX directive, create/control VBX 60
DEF LCS directive, define lowercase table 73
DEF LFA directive, define last file number
Y CVS( ) function, convert string 408
CWDIR directive, change working directory 61
accessed 75
DEF LFO directive, define last file number
Z 'CYAN' & '_CYAN' mnemonics 595
HG
Object 83 variables, DUMP directive 105
DROP CLASS directive, class definition 101 [DLL] special command tag 772, 775
IH
DROP OBJECT directive 103, 378
DLL( ) / DLX( ) functions, call DLL 414
ERASE directive, file or directory 119
DLM system variable, directory delimiter 554
JI
object in scroll region 598
REMOVE directive, record from file 277 'DL' parameter 658
TR
concepts 19 DROP_BOX directive, control drop box 95–100
conventions regarding syntax xiv drop box write error 619
VT check before checking prefix 654 DROP CLASS directive, drop class
delete from system, ERASE directive 119 definition 101
WU delimiter, DLM system variable 554 DROP directive, unload program 94
DOS delimiter 657 DROP INDEX directive, drop key from file 102
XV get current, DIR( ) function 413
home/starting, HWD system variable 559
'DROP' mnemonic 598
DROP OBJECT directive, delete object 103, 378
YW path of current, LWD system variable 561 DSK( ) function, get current disk drive 417
subdirectory delimiter 682
ZX DIRECTORY directive, create subdirectory 90
DSZ system variable, data space available 555
DTE( ) function, convert date 418
dirty file indicator 333
Y DISABLE CONTROL directive 92
’DT’ parameter 658
DUMP directive, display variables 105
Z DISABLE directive, disable prefix 91 'DW' parameter 659
HG 'EI'
handler 120
mnemonic 600
ERR system variable, last detected error 556
IH 'EL' mnemonic 600
'EJ' mnemonic 600
ERS system variable, error’s line number 556
ESCAPE directive, interrupt execution 121
J I ’EL’
’EL’ mnemonic 600
parameter 659
ESC system variable, escape character 557
J
K emulation, See language compatibility
'EM' mnemonic 601
’ES’ mnemonic 602
’ES’ parameter 660
LK ENABLE CONTROL directive, enable CTL 110 'ET' mnemonic 602
'EU' mnemonic 602, 614, 629
ML ENABLE directive, re-enable prefix 109
ENABLE EVENT directive, Internal Event
Event Handing
*SYSTEM 745
NM encryptionEnable 111 Event Handling 70, 227, 799, 817, 819
ON level, ’EL’ parameter 659 DISABLE EVENT directive 93
ENABLE EVENT directive 111
with SAVE directive 291
PO option
PASSWORD directive 238
See also Component Object Model (COM)
EVN( ) function, evaluate numeric 425
QP END_IF
encryption value, HSH( ) function 447
directive, end IF directive 116
EVS( ) function, evaluate string 426
'EW' mnemonic 602
RQ END DEF directive, end function definition 113 exclamation point (!) 25, 276
S END directive, halt program execution 112
See also terminate
EXECUTE directive, execute command 122
TR END
Execution mode 19
SWITCH directive, end branching 114
exit
US END WITH directive 115
ENDTRACE directive, end trace output 117
from a loop, BREAK directive 33
from stack, POP directive 244
VT Enhanced667, File Format (EFF) 22, 58, 166, 330,
679
return CTL=4 on exit 661
to OS on end of program 693
U
W entry point 26 specify arguments 118
ENTER directive, EXIT directive, halt subprogram and return 123
EXITTO directive, end loop, transfer control 124
XV ENV( ) function, get environment values 420 EXP( ) function, raise to base ten 427
YW 'EO' mnemonic 601
EOM system variable, EOM string 555
exponent
assignment, arithmetic operators 815
ZX 'EO' parameter 660
'EP' mnemonic 601
EPT( ) function, return power of 10 422
’EX’ parameter 660
Y EPT( ) function, return exponent value 422 expressions, syntax conventions of xiv
’!V’ parameter 695
ERASE directive, delete file/directory 119
Z 'ER' mnemonic 601 EXTRACT directive, read data 125
@@ EXTRACT RECORD directive, read record 127 READ directive, data from file 267
READ RECORD directive, record from file 271
RENAME directive, change a file's name 278
AA F search rules 248
BB '+F' & '-F' mnemonics 602
'F,' parameter 661
SERIAL directive, create a sequential file 298
SORT directive, create file for sorting 323
CC 'Fn' mnemonic 603 special files 731–761
system limits 820
DD ’F4’ parameter 661
'FB' parameter 661
UNLOCK directive, remove file lock 345
VLR files 22
EE ’FC’ parameter 661
'FE' parameter 661
See also Keyed, Index, and Program files
’FILL’ mnemonic 603
FF 'FF' mnemonic 603 FIN( ) function, return file information 437
G ’FF’
FFN( ) function, find file number 428 FIND directive, locate data 130
HG FIB(
parameter 662 FIND RECORD directive, locate data record 131
) function, file information block 430 'FI' parameter 662
IH FID( ) function, file information descriptor 434
FID(0 ) definition 316
'FL' mnemonic 604
FLOATING POINT directive, switch to scientific
I
J fields
FI directive, See END_IF notation 132
KJ field
'FL' parameter 662
extended field attributes, XFA( ) function 548 FLR, (fixed length record) 22
separator 511
LK fileopt, file options 804 'FN' parameter 663
focus
M L files’FF’22parameter, file format 662 change of focus on/off 602
SET_FOCUS directive 300
NM create/assign program file 255
DIRECT directive, create Direct file 88
See graphical control objects
'FONT' mnemonic 605
ON dirty file indicator 333
dynamic buffering 656
fonts 622, 805
PO EFF files 22 'FO' parameter 663
FOR..NEXT directive, incremented loop 133
FFN( ) function, find file number 428
QP FIB( ) function 430 format
RQ FILE directive, new file from FID, FIB 129
FID( ) function 434 DAY_FORMAT directive 63
masks 159, 251, 521, 807
S FIN( ) function 437 See syntax, dates, control object properties
T R flushing 583
GET_FILE_BOX directive, filename entry 138
formfeed, See printers
'FP' parameter 663
S INDEXED directive, create Indexed file 158
U input/output options 804 FPT( ) function, return fractional part 441
fractional parts, FPT( ) function 441
VT KEYED directive, create Keyed file 57, 165
KNO (file access key) 805
'FRAME' mnemonic 606
@@ G mnemonics 578–579
size of window 575
GAP( ) function, return odd parity string 442 window number 451
AA GBL( ) function, global string variable 443 window region 575
BB 'GD' mnemonic 607
'GE' mnemonic 607
X,Y coordinates 575
See also graphical control objects
CC GEP( ) function, return even parity string 445 graphics
*BITMAP* special file 732
DD GET_FILE_BOX
'GF' mnemonic 608
directive, ask for filename 138
bitmaps/icons 36, 49, 179, 192, 203, 263,
342
EE GFN system variable, global file number 557
GID system variable, OS process ID 558
drawing frame, box, line, arc, polygon,
FF global rectangle, circle 575
’IMAGE’ mnemonic, define graphics
G GBL( ) function, global string variable 443
GFN system variable, global file number 557
group 611
HG global
’PICTURE’ mnemonic, define/draw
variables 25 image 627
search utility 25
IH GOSUB..
SAVE CONTROL directive, screen capture 292
directive, execute subroutine 140 SAVE FILE directive, save bitmap file 294
@@ *HTML* 734
HWD system variable, home directory 559
journalization, SYSTEM_JRNL directive 330
'JR' mnemonic 612
AA HWN( ) function, highest window number 451 'JS' mnemonic 612
JST( ) function, justify string 457
BB I JUL( ) function, return Julian date 459
HG
SETDRIVE directive, change default drive 311 tree view list boxes 192
SHORT_FORM directive 321 LIST directive, list program statements 176
IH
SSZ( ) function 517 list view list boxes 189
Thoroughbred 483, 662, 686, 816
load on demand 725
JI TSM system variable 571
XFA( ) function 548
object properties 702
row highlighting 641
KJ See also ProvideX
LAOD, See LOAD directive 194
’LM’ parameter 668
LNO( ) function, return line number 470
LK Large File Support (LFS) 58, 166, 667
'LB' parameter 667
LOAD CLASS directive, pre-load class
ML 'LC' mnemonic 613
definition 195
LOAD DATA directive, load program
NM 'LC' parameter 667
LCS( ) function, return lowercase string 73, 468
constants 196
LOAD directive, load program into memory 194
ON ’LD’ mnemonic 613
load on demand (list boxes) 725
'LD' parameter 668
PO LEN( ) function, return string length 469
LOCAL directive, designation of local data 197
LOCK directive, reserve file 200
QP 'LE' parameter 668
LET directive, assign value to variable 173
LOG( ) function, return base 10 logarithm 471
logic 104, 498
RQ lexicon 348
AND( ) function, AND comparison 390
See also language compatibility
S LFA system variable, last file accessed 559
descending key 694
TR
IOR( ) function, OR comparison 456
'LF' mnemonic 613 logical ON/OFF control 38, 51
US
LFO system variable, last file opened 560 logical statement references (labels) 810
'LF' parameter 668 NOT( ) function, condition 486
IH 'LU'
library files 208
parameter 669 message bar text 616
TR ATN(
) function, returns arc-sine 393 modes in ProvideX (Execution, Command) 19
) function, return arc-tangent 395 mouse 578
AA MULTI_MEDIA
object properties 702
directive, control interface 222 O
BB MXC( ) / column/line
MXL( ) function, return maximum
484
'*O' mnemonic 620
OBJ( ) function, return object information 489
CC ’MX’ parameter 671 object code 255, 348, 455, 506, 684
Object Oriented Programming (OOP) 22
DD [MYSQL] special command tag 777–779 DEF CLASS directive, define object class 64
EE N DROP CLASS directive, delete class 101
DROP OBJECT directive, delete object 103,
FF '+N' & '-N' mnemonics 619 378
FUNCTION directive, declare method 136
G NAR system variable, startup arguments 563
navigation tips xiv LIKE directive, inherit properties 174
VT OR
POPUP_MENU directive, popup menu 245
comparison, IOR( ) function 456 POS( ) function, scan string 498
W
’OR’ parameter 674
U output, See mnemonics, DUMP, LIST, PRINT ’PP’ parameter 676
'PQ' parameter 676
XV 'OW' parameter 674 PRC( ) function, round number to precision 499
precision
YW P PRC system variable, current precision 565
ZX '+P' & '-P' mnemonics 626 PRECISION directive, change precision 247
round to precision, PRC( ) function 499
PAD( ) function, pad/truncate string 492 prefix
Y parameters 19 DISABLE directive 91
Z PRM( ) function, return parameter value 500
PRM system variable, list of parameters 566
ENABLE directive 109
PFX( ) function, return current prefix 495 issued to terminal devices 159, 226
@@ PFX system variable, current prefix 564 properties
PREFIX directive, file search rules 248
AA table 91, 109, 249
See control object properties
See also Object Oriented Programming
BB PREINPUT directive, prime input queue 250
PRINT directive, display information 251
PROPERTY directive, declare properties 257
ProvideX
CC printers devices 731–761
*VIEWER* device file 746, 749 environments 19
DD *WINDEV* device file 750–752 Execution mode/Command mode 19
*WINPRT* device file 625, 754–757
EE changing source tray 625
introduction 17–25
parameter settings, PRM system variable 566
FF defined on servers 372
DEFPRT directive, define as printer 80
restart 324
SBB 684
G formfeeds 603 session 19
HG
maximum columns, lines 484 syntax xiv
mnemonics 578–580 system limits 819
IH orientation 625
print files 746
terminate session 39, 260, 275
utilities 25
JI queues 757
raw print mode 750
See also PVX, compiled format, language
compatibility
KJ set printer default 683
spooler 582, 590, 658, 680, 746
'PS' mnemonic 630
'PS' parameter 677
LK Windows printer 372, 750–752, 754–757
PRM( ) function, return parameter value 500
PSZ system variable, current program size 566
ML PRM system variable, ProvideX parameters 566
PTH( ) function, return pathname 502
’PT’ parameter 677
PROCESS directive, call a NOMADS panel 252
NM PROCESS SERVER directive, remote server 254
PUB( ) function, list public programs 503
punctuation 25
ON program
concepts, syntax 19
'PU' parameter 677
PO ADDR directive, load/lock program 30
PURGE directive, clear data from a file 259
'PUSH' mnemonic 630
call program on close 645
QP DROP directive, unload program 94 PVX
PVXFID0 environment variable 316, 431,
RQ EDIT directive, edit program 107
Embedded I/O program 308 434
S END directive, halt execution 112 ’PW’ parameter 677
TR
error status 571 'PZ' parameter 677
library 775
US
LOAD directive, load into memory 194
LPG system variable, lead program name 560 Q
VT PROGRAM directive, create program file 255
PSZ system variable, current size 566
'Q^' parameter 678
'Q_' parameter 678
WU public programs 503
RESET directive, reset program state 284
’QD’ parameter 678
'QF' parameter 679
XV RUN directive, transfer/execute program 290
SAVE directive, write to file 291
'QS' parameter 679
’QK’ parameter 679
YW STK( ) function, program call stack 518
system limits 819 ’QT’ parameter 679
ZX trace 320 question mark (?) 26
QUIT directive, terminate ProvideX 260
See also ProvideX, subprogram, compiled
Y format,, Object Oriented Programming quote characters
" , double 25
prompts 19, 26, 677, 679
Z for password 238, 676 ’ , single (apostrophe) 25
@@ QUOcharacter
system variable, ASCII quote
567
REMOVE directive, delete record from file 277
RENAME..INDEX directive, rename keys 281
AA RENAME CLASS directive, OOP class 279
BB R
RENAME CONTROL directive, change CTL
values 280
’*R’ mnemonic 630
RENAME directive, change a file's name 278
CC RADIO_BUTTON directive, control radio
button 261–265
RENUMBER directive, change line numbers 282
DD object properties 703 REPEAT directive, repetitive execution 283
Report Writer 18
EE Radix-40
from ASCII, RDX( ) function 505
reserved words 821
reset
FF RANDOMIZE
to ASCII, TRX( ) function 538
directive, set random key 266 BEGIN directive, reset files and variables 32
G random numbers, RND( ) function 509 CLEAR directive, reset variables 53
HG 'RB'
RESET directive, reset program state 284
mnemonic 630
resource library 622
RCD( ) function, return next record 504
IH RDX(
restart ProvideX 324
'RC' mnemonic 631
RESTORE directive, reset data pointer 285
J I READ DATA directive, read from program 269
) function, ASCII to Radix-40 505
retries, setting default 691
RETRY directive, re-execute instruction 286
KJ READ directive, read from file 267
READ RECORD directive, read record 271
RET system variable, last OS error code 567
RETURN directive, return from subroutine 287
LK REC( ) function, expand IOList 506
records
reverse video 588
ML EXTRACT RECORD directive, read-lock 127 Rexon, See language compatibility
'RI' parameter 679
NM FIND RECORD directive, locate/read 131
IND( ) function, next record index 453 'RL' mnemonic 632
'RM' mnemonic 632
ON KEC(
INSERT directive, new record in file 161
) function, key of current record 461 RND( ) function, return random number 509
PO RCD(
NEXT RECORD directive, end of SELECT 225
) function, return next record 504
RND system variable, random numbers 567
RNO( ) function, return next record number 510
QP READ RECORD directive, read from file 271 ’RN’ parameter 680
RQ REFILE directive, clear data from file 274
REMOVE directive, delete from file 277
rounding control 289
’NR’ parameter 672
RNO( ) function, next record number 510
S SELECT ’RN’ parameter 680
TR system
directive, select/query records 295 ’RS’ parameter 680
limits 819–820 ROUND directive 289
S UPDATE directive, update record in file 347
U WRITE directive, add/update data in file 379
[RPC] special command tag 791–792
'RP' mnemonic 632
VT 'RECTANGLE' mnemonic 631
WRITE RECORD directive, write record 382
'RP' parameter 680
'RR' parameter 680
WU REDIM directive, redimension array 273
'RED' & '_RED' mnemonics 631 'RS' mnemonic 632
XV REFILE
REF( ) function, control reference count 508
directive, clear data from file 274
’RS’ parameter 680
'RT' mnemonic 633
YW RELEASE directive, terminate ProvideX 275 RUN directive, transfer/execute program 290
SAVE DATA directive, save constants 293 SETDRIVE directive, change default drive 311
@@ SAVE directive, write program to file 291, 684 SETERR directive, set error transfer 312
AA SAVE FILE directive, save bitmap file 294
'SB' mnemonic 634
SETESC directive, set interrupt handler 313
SETFID directive, set FID(0) definition 316
BB 'SB' parameter 682 SETMOUSE directive, control/set mouse 317
scientific notation 132 SETTIME directive, set local time 319
CC 'SC' parameter 682 SETTRACE directive, enable program trace 320
DD screen capture, SAVE CONTROL directive 292
scrolling
'SF' mnemonic 635
'SF' parameter 682
EE ’SCROLL’ mnemonic 634 SGN( ) function, return sign of value 512
grid scroll modes 146 SHORT_FORM directive, use short names 321
FF H_SCROLLBAR directive 152–154 SHOW directive, show control 322
scroll region 598
G scroll wheel control 684
’SHOW’ mnemonic 635
HG
SID system variable, system ID code 568
V_SCROLLBAR directive 361–363
SIN( ) function, sine 513
IH
’SD’ parameter 682
'SIZE' mnemonic 635
search
’SK’ parameter 683
JI rules, PREFIX directive 248
search and replace utility 25, 177, 668 slashes (/ or \ ) 26
VT
'SP' mnemonic 636
SET_NBF directive, set Keyed I/O buffers 301 spooler
WU SET_PARAM directive, system parameters 302
SETCTL directive, GOSUB on CTL event 303
See printers
’SP’ parameter 683
XV SETDAY directive, change local date 304
SETDEV directive, set device type name 305
SQL 464, 677, 694, 764, 777, 780, 785
[DB2], [OCI], [ODB], [MYSQL] 763
YW SETDEV IOL directive, change IOList 306
SETDEV KEY directive, change keys 307
SQR( ) function, square root 514
square brackets 25
ZX SETDEV PROGRAM directive, set I/O 'SR' mnemonic 637
program 308
Y SETDEV SEP= directive, change file SEP 309
'SR' parameter 683
SRT( ) function, sort string 515
Z SETDEV TSK( ) directive, add to TSK( ) List 310 SSN system variable, system software ID 568
US
SYSTEM_JRNL directive, file system
lowercase string, LCS( ) function 468 journalization 330
numeric to string, STR( ) function 521
VT
’SZ’ parameter 684
odd parity value, GAP( ) function 442
PAD( ) function 492
WU scan for mask, MSK( ) function 482 T
scan for occurence, POS( ) function 498
XV sort, SRT( ) function 515
'+T' & '-T' mnemonics 637
TABLE directive, define translation table 336
strip characters, STP( ) function 519
YW substitute text, SUB( ) function 523 tables
accent conversion table 66, 69, 73
ZX text height, TXH( ) function 540
to different values, CVS( ) function 408 convert string via table, TBL( ) function 528
date table 66, 69, 73
Y truncate, PAD( ) function 492
uppercase string, UCS( ) function 542 define system tables 66, 69, 73
input conversion table 610
Z SUB( ) function, substitute text 523
lowercase table 66, 69, 73
NM W
'+W' & '-W' mnemonics 641
ON V WAIT directive, temporarily halt execution 368
WAIT FOR EVENT directive 369
PO V_SCROLLBAR
'+V' & '-V' mnemonics 641
directive, control vertical 'WA' mnemonic 642
QP scrollbar 361–363 'WB' parameter 689
'WC' mnemonic 642
object properties 704
RQ values, See numeric values, strings 'WD' mnemonic 642
S VARDROP_BOX directive, control variable drop 'WD' parameter 690
TR variables
box 350–352, 354–355 [WDX] special command tag 795
object properties 704 WebServer xiii, 819
S 25
U CHG( ) function, if variable changed 398 WEND directive, end of WHILE Processing 370
'WF' parameter 690
T
V IOLIST directive, specify variable list 164
GBL( ) function, global string variable 443 'WG' mnemonic 642
WHILE.. directive, repeat statements 371
WU LET directive, assign value to variable 173 'WHITE' & '_WHITE' mnemonics 642
LOCAL directive, designate local data 197
XV LONG_FORM
reset 53, 86
directive, long names only 201
WHO system variable current userID 572
'WH' parameter 690
YW SETDEV IOL directive, alter IOList 306 *WINDEV* 750
Queues 757
SHORT_FORM directive, use short names 321
ZX string variables 25 ’WINDOW’ mnemonic 643
system variables 551–572 Windows 690, 763
Y Variable Definition file 196, 293 API Frame Styles 575
VIA directive, assign variable indirectly 364 clipboard 54
Z VIN( )/VIS( ) functions, contents of 545 DIR( ) function, get current directory 413
CC resources
spooler 582
(GDI) 21, 578
Z
DD SYSTEM_HELP directive, invoke help 328
VIDEO_PALETTE directive, video colours 366
'+Z' & '-Z' mnemonics 581, 646
ZLib compression 58, 166, 400, 534, 543, 692
EE Windows-only parameters 688 'ZP' parameter 693
XP-style GUI 582
FF WindX xiii, 795–801
'ZX' mnemonic 641, 647
HG WINPRT_SETUP
Queues 757
H
I 'WI' parameter 690
directive, windows printer 372