Scripting a text to binary digits converter
Bryan McCormick
bryan at deepfoo.com
Mon Jan 2 16:33:50 EST 2012
JB, Jim, Guglielmo
Okay, this is the final version of the script which does seem
considerably faster than where I started.
Thanks to all. Hope this was a useful walk-through.
Any other suggestions on ways to improve?
---------------------------------------------
function convertTextToBinary varText
repeat with n = 1 to the number of chars of varText
put chartonum(char n of varText) into theNum
put baseConvert(theNum,10,2) into tBaseConverted
put char -8 to -1 of ("00000000" & tBaseConverted ) into
tBaseConverted
put tBaseConverted after tConverted
end repeat
return tConverted
end convertTextToBinary
More information about the use-livecode
mailing list