* tests/aliaslck.prg
* tests/files.prg
* tests/inherit.prg
* tests/newrdd.prg
* tests/omacro.prg
* tests/testcdx.prg
* tests/testdbf.prg
* tests/testrdd.prg
* tests/testrdd2.prg
* tests/tstuse.prg
* tests/wcecon.prg
! fixed to deleted test dbfs/indexes/dirs created along the way
! misc other corrections
53 lines
981 B
Plaintext
53 lines
981 B
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* This file tests support for passing object methods and vars
|
|
* using macro syntax
|
|
*/
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL obj := ErrorNew()
|
|
MEMVAR send1, send2
|
|
|
|
PRIVATE send1 := "_description"
|
|
PRIVATE send2 := "_tries"
|
|
|
|
obj:tries := 1
|
|
obj:&send1 := "test"
|
|
|
|
obj:tries += 1
|
|
obj:tries++
|
|
++obj:tries
|
|
|
|
WITH OBJECT obj
|
|
:tries += 1
|
|
:tries++
|
|
++:tries
|
|
|
|
/*
|
|
Notice that for post/pre increment decrement operators and
|
|
for assigments (:=,+=,-=,*=,/=) the macro have to
|
|
start from the underscore symbol '_'
|
|
|
|
To access the object variable using macro the '_' should be omitted
|
|
*/
|
|
:&send2 += 1
|
|
:&send2++
|
|
++:&send2
|
|
++:&( send2 )
|
|
|
|
:&( send2 ) := :&( SubStr( send2, 2 ) ) + 1
|
|
|
|
:&send1 += " description"
|
|
:&( send1 ) += " of "
|
|
ENDWITH
|
|
|
|
obj:&( "_" + SubStr( send1, 2 ) ) += "Error object"
|
|
? send1, "=", obj:&( SubStr( send1, 2 ) )
|
|
? send2, "=", obj:tries
|
|
|
|
RETURN
|