Page 1 of 1

RATS unresponsive

Posted: Fri Sep 19, 2008 10:24 am
by cap
I am having a problem where RATS becomes completely unresponsive and will not evaluate even the simplest code submitted, and shows no errors in the output window.

I began with the following code, which works fine:


--------------------------

compute counter = 0


do i=1,10



if condition
{

compute counter = counter + 1

}




end do i



more code

-------------------------



But if I add one more little part, so that it becomes the following,
then RATS becomes completely unresponsive, and no code submitted will be run.



--------------------------

compute counter = 0


do i=1,10



if condition
{

compute counter = counter + 1

}




end do i


if counter.eq.0
{
some code
}



more code

-------------------------

It would be nice if RATS could display any sort of error message for this, but none come up.

Any ideas?


-CP

Re: RATS unresponsive

Posted: Fri Sep 19, 2008 2:31 pm
by TomDoan
cap wrote:I am having a problem where RATS becomes completely unresponsive and will not evaluate even the simplest code submitted, and shows no errors in the output window.

I began with the following code, which works fine:

Code: Select all

compute counter = 0
do i=1,10
if condition
   {
   compute counter = counter + 1
   }
end do i
more code

-------------------------

But if I add one more little part, so that it becomes the following,
then RATS becomes completely unresponsive, and no code submitted will be run.

--------------------------

Code: Select all

compute counter = 0
do i=1,10
   if condition
      {
      compute counter = counter + 1
      }
end do i
if counter.eq.0
   {
   some code
   }
more code
-------------------------

It would be nice if RATS could display any sort of error message for this, but none come up.

Any ideas?


-CP
In the second case, the "IF" puts RATS into compile mode. It's looking for the signal to take it out of that. An END will do that. If that looks weird, rewrite as

Code: Select all

{
if counter.eq.0
   {
   some code
   }
}
The { here is implied when RATS sees an "IF" outside of another compiled section, and it needs an explicit } or END to terminate the section.