Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

OMShell Loop

OMShell Loop

Hi

How can I create a loop in OMShell? I saw this code in the User Guide but it doesn't work [<interactive>:1:0-1:3:writable] Error: Parser error: Unexpected token near: for]

k := 0;
   for i in 1:1000 loop
   system("Myexecutable.exe")
     k := k + i;
   end for;

Is this an acceptable way to run a executable file many times in OMShell?

Thank you.

There are 0 guests and 0 other users also viewing this topic