Mike,
Once a variable is declared, its pointish nature becomes implicit
function binary_decode(char* s) as quad
quad x = 0
byte p at @s
'
while (p != 0) // O2 logic isn't short-circuited!
if (p == 0x31 || p == 0x30) then // '1' '0'
x *= 2 // ugly but no shifts available for O2 quads!
x += p - 0x30 // '0'
@p++ 'increment address
else
exit while
end if
wend
return x
end function
print binary_decode("1")
PS: binary 0b, and Octal 0o conversions are available
s="1001"
print val "0b" & s
'9