Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » [SOLVED] Is it possible to use recursion in rcptt ?(#loop #recursion #table_splitted_in_different_pages)
[SOLVED] Is it possible to use recursion in rcptt ? [message #1712800] Wed, 28 October 2015 10:42 Go to next message
Angelo Luciani is currently offline Angelo LucianiFriend
Messages: 129
Registered: September 2015
Location: Milan
Senior Member

Dear all,
I have a case to test where I have a table and the table is splitted in different pages.
I need to select an item but I don't know the order.
I think to create a recursive procedure that while don't find the element change the page.
RCP TT support recursion ?
Thanks in advance.




"Ce sont les petits désirs qui rendent un jeune homme hardi."
Giovanni Giacomo Casanova

[Updated on: Fri, 06 November 2015 11:34]

Report message to a moderator

Re: Is it possible to use recursion in rcptt ? [message #1712801 is a reply to message #1712800] Wed, 28 October 2015 10:48 Go to previous messageGo to next message
Ulyana Skorokhodova is currently offline Ulyana SkorokhodovaFriend
Messages: 280
Registered: July 2014
Senior Member
Hi Angelo,

Yes, RCPTT supports recursion.
Please see loop and recur ECL commands.

Kind regards,
Ulyana.

icon6.gif  Re: Is it possible to use recursion in rcptt ? [message #1713743 is a reply to message #1712801] Fri, 06 November 2015 11:33 Go to previous messageGo to next message
Angelo Luciani is currently offline Angelo LucianiFriend
Messages: 129
Registered: September 2015
Location: Milan
Senior Member

Thank you Ulyana Razz Very Happy ,
I try a quick example and it works. Cool

Below the code


//Print 4 show-alert using recursion just like a for
// Print show-alert completed when the value of count is 5

loop [val count 1] [val n 5] {
    if [$count | lt $n] {
          $count|plus 1
        show-alert $count
        recur [$count | plus 1] [$n]
    } -else {
      show-alert "completed"
    }
}


"Ce sont les petits désirs qui rendent un jeune homme hardi."
Giovanni Giacomo Casanova

[Updated on: Fri, 06 November 2015 11:34]

Report message to a moderator

Re: Is it possible to use recursion in rcptt ? [message #1744026 is a reply to message #1713743] Wed, 21 September 2016 14:07 Go to previous message
Komal Sorte is currently offline Komal SorteFriend
Messages: 2
Registered: September 2016
Junior Member
How do I write a simple code for factorial of a number in ECL ?
I've tried the below given code:

proc "factorial" [val num ]{

if[$num | gt 1]{

let [val fact [$num | mult [factorial [$num | minus 1]]]]{
show-alert [$fact]
}

}-else{

int 1
}

}

//Call to the procedure factorial
factorial 5
Previous Topic:ECL command
Next Topic:Stop test suite when a test fails
Goto Forum:
  


Current Time: Sat Nov 09 00:55:09 GMT 2024

Powered by FUDForum. Page generated in 0.03043 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top