Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to use variable reference syntax
#1
In the users manual an example is given of defining an array:

global IncrementDist(512);

and then doing

MyTotalDist = sum(&IncrementDist, 512, 1)

to get the sum.

I'm trying to do this but getting the error:

Error : ( error #31) data error in equation : Q1045 = sum(&IncrementDist, 512, 1)

This seems to happen regardless of where I place the line or what variable it's assigning to. I am using IDE version 4.1.0.24 and firmware version 2.4.0.180.
Reply
#2
Your syntax is slightly off. It should be:

MyTotalDist = sum(&IncrementDist(0), 512, 1)
Reply
#3
Ah thanks, a mistake in the manual then.
Reply
#4
Please provide us with manual name, date, and page where you found the error so we can correct it. In some places it is described correctly.
Reply
#5
The Power PMAC Users Manual, May 14 2018, p.523
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)