I need an array of the same dimensions (to hold values 0 or 1) as an argument to a function which may be of any rank and any type. The result array will contain 0 for failure and 1 for success (I could use Boolean) arising from a process. How can I create the result array?
-
What is the specific requirement? Did you try anything? Creating a boolean array of a specific size maybe?Arghya C– Arghya C2015-10-04 20:20:36 +00:00Commented Oct 4, 2015 at 20:20
-
This seems like an insane requirement. For failure, you should throw an exception.Ian Newson– Ian Newson2015-10-04 20:30:58 +00:00Commented Oct 4, 2015 at 20:30
-
@IanNewson: It's not insane. There are times when you have a list of things you want to do, and you want to report which of them could be done. Exceptions are often the best solution for failure situations, but not always.StriplingWarrior– StriplingWarrior2015-10-04 20:36:13 +00:00Commented Oct 4, 2015 at 20:36
Add a comment
|