Hi,
It's possible to use structureType as result of a user function or user subroutine ? I don't a have clues to do this ( by pointer?)
I Try this code but each time i have a crash from CR1000XComp.exe
StructureType device id As Long Result As Double EndStructureType Function f1( a As Long, r As Double) As device f1.id=a f1.Resul=r EndFunction Sub f2(ptr_device As device!,a As Long, r As Double) Dim test As device test.id=a test.Result=r !ptr_device=test 'or ptr_device=@test EndSub Public d1 As device Public ptr_d1 As device! Public var_id As Long = 2 Public var_result As Double = 2543.324 BeginProg Scan(1,sec,0,0) ' d1=f1(ptr_d1,var_id,var_result) ' Call f2(ptr_d1,var_id,var_result) NextScan EndProg
This post is under review.