Question: Caused by Global variable?

#### Code attached at the BOTTOM ####

If I run these seperately, they seem to be running fine as shown above. But when I run '8' after '7', it does not seem to be working as in first picture.


it did not even work if I do '3-6' first, then '7' is taking too 'long', much longer than running '7' along. Not sure if it will even run.

Joining '3-7' together, it does not run either, or just taking too long.


#### Code ####

Download V9C.txt


I called this file V9.c then it reads into Maple. You may rename it to V9.c in order to run it from my worksheet.


There are TWO global variables p and phi from the procedure indprob.

I wonder if it could be causing this problem? and thus taking a 'long' time to run?

As there are random numbers involved, so every time I run it, there is a restart at the top, if you are using Maple 17, I assume you could reproduce the same result (error).




Please Wait...