AnsweredAssumed Answered

Problem with public record

Question asked by alexis on May 9, 2018
Latest reply on May 10, 2018 by alexis

Hi,

In a package, I am creating a public record, to be returned by the public function testFunc

 

package testPackage

 

public declarations

      testRec= record
            d: real
      end-record
end-declarations

 

public function testFunc: testRec

     returned.d = 0.0

end-function

 

end-package

 

Now, I am trying to call testFunc in another package

 

uses  "testPackage"

 

procedure testPublicRecord

     declarations

          testRecInstance: testRec

     end-declarations

 

     testRecInstance := testFunc

end-procedure

 

testRecInstance := testFunc compiles but when I try to access testRecInstance.d, the compiler complains Type `testRec' has no field named 'd'

 

Thanks

 

Alexis

Outcomes