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

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

Recommended Posts

Posted

Hello all,

still I did not fully understand how to implement recursion....

admittedly I am lost- and very much so:

There is a list of values = list

By script, I am looping through another list with keys.

Now I would like to check if the key is in the list.

First I was thinking to get the value with Position ( list ; key; 1; 1).

The problem is that in list, there might be 4651 and key might be 6, which would make Position true.

However 4651 is not 6.

Hence, I thought to loop through list by recursion and to check with the "=" but I dont know how to build this:

Let (

[

list = thelist;

k = thekey

counter = 1

c = valuecount (thelist)

];

Case ( counter > c ; "";

// this is my exit

GetValue ( list; 1) = k ; 1;

and here is am not getting the calc to recurse...

My second thought was to turn 6 into 0006 and then use Position. However the Length of the keys might change and

it seems not the right approach.

Who could help a dummy, please....

thanks

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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