Statistical programming, matrix languages, and more

Syntax Running without an output

Reply
Contributor
Posts: 37

Syntax Running without an output

Dear all.,

The attached syntax is running and running , but it gave no output or even errors.

Could you help me with this problem?


Attachment
SAS Super FREQ
Posts: 3,406

Re: Syntax Running without an output

You have an infinite loop. There is no reason to expect the DO UNTIL loop to ever terminate.

In fact, if you let it run for 10,000 iterations, you get a plot that looks like the one I've attached. For these iterations |z| is usually in [-0.5, 0.5].

junk.png

A good programming practice is to put a maximum number of iterations on the DO/UNTIL loop, like this:

   do rl = 1 to 10000 until(zz>h|zz<-h);

   ...

  end;

That way, you never have an infinite loop.

Ask a Question
Discussion stats
  • 1 reply
  • 260 views
  • 0 likes
  • 2 in conversation