4D has improved over the years, but there is still a number of type handling 
inconsistencies. Only option seems to be to work around them by moving data 
into different variable types.

The method below (_TEST) works interpreted but gives a runtime error in 
compiled mode. Reported as a bug in 2016 for 4D 15. Still fails in 17.1


C_POINTER($1)
C_TEXT($val)

If (Count parameters>=1)
        $val:=String($1->;HH MM SS)
        ALERT($val)
Else 
        ARRAY TIME(ah_Time;1)
        ah_Time{1}:=Current time
        _TEST (->ah_Time{1})
End if 



Here is another issue in 4D 17.

C_OBJECT($object)
C_POINTER($field)

$object:=New object("tableNumber";1;"fieldNumber";1)

$field:=Field($object.tableNumber;$object.fieldNumber)

The above works but the Field command won't compile: Too many parameters have 
been passed to this method.


John DeSoi, Ph.D.


> On Feb 28, 2019, at 1:53 AM, Jeremy Roussak via 4D_Tech 
> <[email protected]> wrote:
> 
> I get no errors, interpreted or complied. 
> 
> That seems to me to be a fault somewhere in 4D’s handling of pointers.

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to