PN3_10085

 


Patch PN3_10085
Keyword RUNTIME
Description Allow file variables to be compared with vars
Date June 19, 1998
Patch Details This patch extends the ability to compare file variables with normal variables.

In particular, the following piece of code failed with a memory error:

OPEN "FILE" TO FILEVAR ELSE STOP
IF FILEVAR EQ "" THEN PRINT "Not opened"


Now when you do comparisons, the string that is compared is of the format "inode*device" so not only can you compare file variables with "", you can also compare file variables with each other to see if they are they same file.

An example of code that tests the new functionality is:

OPEN "FILE1" TO DSCB1 ELSE STOP 201,"FILE1"
OPEN "FILE1" TO DSCB2 ELSE STOP 201,"FILE1"
OPEN "FILE2" TO DSCB3 ELSE STOP 201,"FILE2"
DSCB4 = DSCB3
DSCB5 = ""
IF DSCB1 NE DSCB2 THEN PRINT "Error" ; DEBUG
IF DSCB2 EQ DSCB3 THEN PRINT "Error" ; DEBUG
IF DSCB3 NE DSCB4 THEN PRINT "Error" ; DEBUG
IF DSCB4 EQ "" THEN PRINT "Error" ; DEBUG
IF DSCB5 NE "" THEN PRINT "Error" ; DEBUG

This patch description is for use by jBASE customers and VARs as an aid to supporting their jBASE installations only and may not be redistributed or published in any form without prior written permission of jBASE Software. This page was produced on February 14, 2000.