Notifications
Clear all

[Closed] Last bit?

deleted…

you are pushing first cut to the third quarter (at 3/4)… generally it shouldn’t be right

What a mess!! I need a nap… and a coffee. and another nap.
Sorry :shrug:

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