cundif()

Function groupExecute on clientPlatform(s)
ClassNOAll

Syntax

cundif(differences,class)

Description

Restores an older version of a class using the list of differences created by cdif().

The cundif() function is used to roll back the changes made to a class after having compared two versions of the same class with cdif(). The list of binary differences must be passed to an older version of the same class.

Note that you can store multiple sets of differences or "revisions" of a class and, at any time, "reconstruct" an earlier version by successively applying cundif() against that particular class.

Example

# having created lDiffList with cdif()...

Calculate
 
lOldClass
 as 
cundif
(
lDiffList
,
lNewClass
)

If
 
#ERRCODE

  
OK message
 (
Sound bell
)
 {
[
#ERRTEXT
]
}

  
Quit method
 

End If
 
# now assign the binary field containing the class to a window class

Calculate
 
lVar1
 as 
$windows
.
window1
.
$classdata.$assign
(
lOldClass
)

If
 
lVar1
=0
 
## class in lOldClass is not a valid window

  
OK message
 (
Sound bell
)
 {
The assign has failed...
}

  
Quit method
 

End If