Skip to main content
1-Visitor
April 21, 2017
Question

Custom Functions using sheet include.

  • April 21, 2017
  • 3 replies
  • 1641 views

Hi all I have a sheet that I declare my custom functions like a drift calculation for resistors lets call this resistor_calcs, then if I include this sheet in a new worksheet using the include sheet function and try to use the functions in resistor_calcs I get a undefined variable error.

Capture1.PNG

in resistors.mcdx I have

Capture2.PNG

Now in M15 this works fine, so I wanted to ask does prime support user defined functions which are imported using the include sheet directive.

I have tried something really basic also like declaring a function x(b,c):=b+c  and then using x(1,2)=  in the remote worksheet, still this does not work.

I' running Prime 4.0.

Also second note where are the hyperlink insertions in prime.....

Any ideas...

3 replies

21-Topaz II
April 21, 2017

Prime has some major limitations compared to M15. I would say it is still in the process of gestation. Better use it for simple things ... elementary ... as the "grid" suggests ...

24-Ruby III
April 21, 2017

Please check attached example. Does it work normally for you?

Pic_1.png

23-Emerald IV
April 22, 2017

Your function (in the subsheet) contains a power with a divisor (denominator) that has a unit.

In your calling sheet, you call the function, but without properly assigning units.

Correct that, and see if it works.

Success!

Luc