<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Kurt,<div><br></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">I tracked the problem down to a call of "</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">SetFunctionParam".</span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">To use my ODE Module plugin, the user has to provide a function called "derivs" which calculates the derivatives of dependent variables at a given time. The function expects the time, the variable values and delivers the derivatives. Example declaration:</span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Monaco; "><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">function derivs(t, y1, y2, y3, y4, dydt1, dydt2, dydt3, dydt4: extended);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Monaco; "><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Monaco; "><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">From ODEModule, I call the function like</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Monaco; "><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Monaco; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">        </span></font></span><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">SetFunctionParam</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">(</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">DefName</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">, 1, x);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">        </span></font></span><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">for</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"> (i = </span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">1</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">; i &lt;= </span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">N</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">; i++)</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">                </span></font></span><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">SetFunctionParam</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">(</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">DefName</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">, i+</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">1</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">, y[i]);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">        </span></font></span><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">for</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"> (i = </span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">1</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">; i &lt;= </span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">N</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">; i++)</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">                </span></font></span><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">SetFunctionParam</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">(</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">DefName</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">, i+</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">N</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">+</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">1</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">, dydx[i]);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; min-height: 14px; "><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">        </span></font></span><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">t = </span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">CallFunction</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">(</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">DefName</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">, </span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">0</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; min-height: 14px; "><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">        </span></font></span><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">for</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"> (i = </span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">1</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">; i &lt;= </span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">N</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">; i++) {</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">                </span></font></span><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">dydx[i] = </span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">GetFunctionParam</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">(</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">DefName</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">, i+</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">N</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">+</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">1</span></font><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">        </span></font></span><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">}</span></font></div><div><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div></div></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">DefName is a Str255, i is short, x, y[i] and dydx[i] are double values. N is four in this example.</span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">Like I said, it works with pro Fit 6.0.6, but with 6.1.10 on Intel, it doesn't. And I get the&nbsp;</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">"ODE Module: Bad parameter value for this function." message.</span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">If I comment out the SetFunctionParam() calls,&nbsp;it "works" in a way that it doesn't behave like I described below, e.g. plot all the curves in one window without title etc.</span></font></div><div><br></div><div>Could this be a pro Fit problem with callback functions that use double/extended values?</div><div><br></div><div>Best regards,</div><div><br></div><div>Dirk</div><div><br></div><div><br></div><div><font class="Apple-style-span" color="#26474B" face="Monaco" size="2"><span class="Apple-style-span" style="font-size: 10px; "><br></span></font><div><div>Am 05.07.2009 um 07:59 schrieb pro Fit Support:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Dirk<div><br></div><div>I am not aware of any such issues with pro Fit 6.1 on a general level. I assume that this may be related to your plug-in. I propose you send a copy of the whole Xcode project to <a href="mailto:profit@quansoft.com">profit@quansoft.com</a>, together with a detailed description on how to run it and how to reproduce the errors. We then might be able to track down the issues.</div><div><br></div><div>Best regards</div><div><br></div><div>Kurt Sutter</div><div>QuantumSoft</div><div><br><div><div>On 4 Jul 2009, at 2:54, Dirk Fröhling wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: monospace; "><div>Hello,</div><div><br></div><div>I&nbsp;recently&nbsp;upgraded from pro Fit&nbsp;6.0.6 to 6.1.10. I once wrote a plugin for the solution of systems of differential equations (ODE Module, see&nbsp;<a href="http://www.dirk-froehling.privat.t-online.de/page2/page2.html)">http://www.dirk-froehling.privat.t-online.de/page2/page2.html)</a>. It still is a Carbon-based PPC version. Now I wanted to update it to an Universal plugin (PPC/Intel), using XCode instead of CodeWarrior.</div><div><br></div><div>I managed to build the plugin successfully, but when I try it with pro Fit 6.1.10 on an Intel Mac it does not work. When I use it with 6.0.6 on the same Mac, it does work.</div><div><br></div><div>Some observations on 6.1.10:</div><div><br></div><div>- My calculation routines report errors. I guess this is due to conversion problems of values the program gets from dialogs, but I haven't verified that yet.</div><div><br></div><div>- The program produces plots that should be drawn in different drawing windows, but all the plots are drawn in one single window whose title isn't set.</div><div><br></div><div>- If I stop the program by clicking on the "Stop" button of a dialog I included for this purpose, it ends with an error message saying "ODE Module: Bad parameter value for this function." This message is not from the plugin.</div><div>&nbsp;</div>- Like I said, none of these problems occur with pro Fit&nbsp;6.0.6 and the very same plugin.<br><br>Has somebody experienced similar problems? Could it be a compiler settings problem? I started using the sample program project from 6.1.10.</span><div><font class="Apple-style-span" face="monospace"><br></font></div><div><span class="Apple-style-span" style="font-family: monospace; ">Regards,</span></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><span class="Apple-style-span" style="font-family: monospace; ">Dirk<br></span><br><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Fachhochschule Gelsenkirchen</div><div>Fachbereich Maschinenbau</div><div>Prof. Dr. Dirk Fröhling</div><div>Neidenburger Str. 10</div><div>D-45897 Gelsenkirchen</div><div><br class="khtml-block-placeholder"></div><div>Tel.: 0209/9596-171</div><div>E-Mail:&nbsp;<a href="mailto:dirk.froehling@fh-gelsenkirchen.de">dirk.froehling@fh-gelsenkirchen.de</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></div></span></div></div></div>_______________________________________________<br>proFit-list mailing list<br><a href="mailto:proFit-list@quantum-soft.com">proFit-list@quantum-soft.com</a><br><a href="http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com">http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com</a><br></blockquote></div><br></div></div>_______________________________________________<br>proFit-list mailing list<br><a href="mailto:proFit-list@quantum-soft.com">proFit-list@quantum-soft.com</a><br>http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com<br></blockquote></div><br></div></body></html>