EdGarrity / SOS

Search for an Optimum Solution
1 stars 0 forks source link

Add I/O Commands #91

Open EdGarrity opened 4 years ago

EdGarrity commented 4 years ago

Add input and output instructions to PushP.

IN Push the Nth element from the input array onto the Float stack. N is popped from the Integer stack. If N < 0, or if N >= size of input array, or the Integer stack is empty then a NO-OP is executed instead.

INALL Pushes all elements of the input array onto the specified stack

INALLREV Pushes all elements of the input array onto the specified stack in reverse order

OUT Pop the top element from the Float stack and copy it to the Nth element of the output array. N is popped from the Integer stack. If N < 0 or the Integer stack is empty then a NO-OP is executed instead. If N >= the size of the output array then the number is copied to the element after the last element of the output array.