Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4922 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

It seems that the max recursion's number is: 356.

So, if the calc is:

Let(

$i = $i + 1 ;

[color:red]$i ^ 5 & If ( $i < EndLoop ; ¶ & Test ; Let( $i = "" ; "" ) )

)

you'll have all the values till 356^5 = 5,718,076,875,776

Another limitation is that it works only into unstored calculations.

( So I think that an UNSTORED calculation works by using its field name, not to keep its content, but to [color:green]evaluate its own calculation )

Posted

It seems that the max recursion's number is: 356.

So, if the calc is:

Let(

$i = $i + 1 ;

[color:red]$i ^ 5 & If ( $i < EndLoop ; ¶ & Test ; Let( $i = "" ; "" ) )

)

you'll have all the values till 356^5 = 5,718,076,875,776

Another limitation is that it works only into unstored calculations.

( So I think that an UNSTORED calculation works by using its field name, not to keep its content, but to [color:green]evaluate its own calculation )

Can you please explain the underlined element?

Posted

If you try my file ( attached to the first post ), you'll see that EndLoop is a field where you can enter the number of recursions.

Posted

D J

Yes it is interesting to know but I can't find a real use for it, neither for those that haven't Advanced ( they still have ScriptMaker ).

The more interesting thing that I learn from it is the way FileMaker handles unstored calculation fields.

  • 1 month later...
Posted

Hi daniele,

I just looked at this file do to the current thread Here and I'm wondering what the purpose of the calculation is.

If it is to make a list of the alphabet that includes each letter up to the number in the EndLoop, then why does it skip the letter "i", or have I missed something again?

Lee

Posted

Hi Lee

this is the string that I used in that example: "abcdefghkjilmnopqrstuvwxyz" ( i at 11th position )

but had to be: "abcdefghijklmnopqrstuvwxyz" ( i at 9th position )

  • 6 months later...
Posted

from another thread:

For anyone reading this thread, you included, I'd recommend against forcing recursion by referencing a calculation field to itself. Although it might seem to work in some circumstances, it's not possible to predict how it will behave under other conditions. Unlike a custom function, there is no built-in protection against stack overflow and you might easily end up with the application crashing and your file being corrupted.

Hi comment

I wish to go more inside this subject, expecially the ipothetic corruption.

My tests didn't give any crash, even if I do not trap for recursion's number.

Posted

My tests didn't give any crash

That doesn't mean it won't crash in other tests. I'm not saying it will, but it's not possible to prove it won't. The only conclusive test possible is one that does crash - but I am not going to try that.

  • Like 1
Posted

I do not think it is right to argue that a certain calculation will fail and will have dire consequences, but without having the evidence.

BTW: At least one advantage: allows you to directly test a future custom function

Posted

Let me try and make this as clear as I can:

The "Technical specifications of FileMaker Pro 11 and FileMaker Pro 11 Advanced" state:

Recursion limit for custom function:

1. 50,000 recursive calls total

2. The call stack is only allowed to be 10,000 calls deep at any point.

If these limits are violated, the custom function will return "?".

The specifications do not mention a limit for a calculation field calling itself - so either there is no such limit, or circular reference is not supported. Draw your own conclusion and proceed at your own risk.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.