Nested parameterized definitions Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Nested parameterized definitions « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

David Benin (dben)
Junior Member
Username: dben

Post Number: 3
Registered: 09-2007
Posted on Saturday, September 05, 2009 - 08:22 pm:   

Can FlexPDE handle NESTED parameterized definitions? I am using the antique version 2.22c, and it appears that it cannot, at least in the form I want. That form is basically this:

a function F is defined by a parameterized definition statement, like say

F(n,x) = if n=0 then 1
else if n=1 then x
else if n=2 then 3*x^2+5
else ... ,

followed by a second parameterized definition

C(n) = bintegral(F(n,x), 'path name') .

The F definition is OK -- I can plot correct elevations of F -- , and the right-hand side of the C definition is OK too in the sense that statements like "report bintegral(F(2,x), 'path name')" give the correct numbers. But "report C(2)" or any other valid value for the argument gives zero.

I can send a little illustrating script if you'd like.
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1289
Registered: 06-2003
Posted on Saturday, September 05, 2009 - 08:42 pm:   

Post a script and we will try it on version 6.
A lot has changed since version 2.

Top of pagePrevious messageNext messageBottom of page Link to this message

David Benin (dben)
Member
Username: dben

Post Number: 4
Registered: 09-2007
Posted on Sunday, September 06, 2009 - 05:12 am:   

Thanks for your attention, Dr. Nelson. Here's a script.

application/octet-streamnest test
temp.pde (1.6 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1290
Registered: 06-2003
Posted on Sunday, September 06, 2009 - 02:50 pm:   

It appears that the BINTEGRAL breaks the parameter passing mechanism.

I was not aware of this problem, so it is not fixed even in version 6.

I will look into it.
Thanks for reporting this problem.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration