Skip to main content
1-Visitor
January 7, 2016
Solved

Multiple outputs from program

  • January 7, 2016
  • 2 replies
  • 2525 views

Hello,

I have a question about how I can get multiple out puts from a single program made up of nested loops.

Can I only return a single variable from a program or am I looking at this all wrong. I've attached a sample worksheet in Prime 3.1.

I'm trying to understand how to get dout, rout, eout as well as a1 out of the program.

Thanks,

Ken

Best answer by MJG

You can make the program output a matrix with all the variables you desire.  Just make the last line of your program "stack(dout, rout, eout, a1)"

If you want each value as an individual variable, you can also use a matrix of variables to define the program.  Example:

2 replies

MJG1-VisitorAnswer
1-Visitor
January 7, 2016

You can make the program output a matrix with all the variables you desire.  Just make the last line of your program "stack(dout, rout, eout, a1)"

If you want each value as an individual variable, you can also use a matrix of variables to define the program.  Example:

kriley1-VisitorAuthor
1-Visitor
January 7, 2016

Thank you Mark and Richard. This is exactly what I was needing.

19-Tanzanite
January 7, 2016

Since it's Prime 3.1 I can't read your file, but something like this:

kriley1-VisitorAuthor
1-Visitor
January 7, 2016

Thank you Mark and Richard. This is exactly what I was needing.