Input dat,"Input the binary number","Binary"
If dat>1111111111111112 Or dat<0
Then
Message "The input number is out of range.","Logic Error"
Return
IfEnd
Int(dat)
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}=>bin
For 1=>cont To 16
If dat=0
Then
Break
IfEnd
dat/10=>dat
Frac(dat)*10=>div
Int(div)=>div
If div>1
Then
Message "Only type 1 or 0.","Logic Error"
Return
IfEnd
div=>bin[cont]
NextI want to store a 16 bits binary data (the user type it) on an array, but this code have some problems when cont>14, by example if i type 1111111111111111 (=FFFF hex), in the array the last 3 "1" that i type dont be writed on the array, i have on that array a FFF8 hex. Its like when i make divisions etc... that data be erased.
Hope that somebody can help me.


			
			
			
				
				
				
			