Notifications
Clear all
[Closed] Last bit?
Page 4 / 4
Prev
Jun 01, 2017 12:19 am
you are pushing first cut to the third quarter (at 3/4)… generally it shouldn’t be right
Jun 01, 2017 12:19 am
What a mess!! I need a nap… and a coffee. and another nap.
Sorry :shrug:
Jun 01, 2017 12:19 am
Just for fun, to practice Python, I’ve written one of these functions.
It works, but… How do I get the result from Python (I mean, the ‘i’ python variable value)?
(
-- First Available Bit in PYTHON
aaa= #{1..1000000, 1000002}
commandString =
"
import MaxPlus
def firstAvailableBit(bits):
def firstBit(arr):
count = 0
for n in arr:
count += 1
if n:
break
return count
return firstBit(bits)
bitsFP = MaxPlus.Core.EvalMAXScript('aaa')
bits = bitsFP.Get()
i = firstAvailableBit(~bits)
print i
"
r = python.execute commandString
)
Page 4 / 4
Prev