Posted 13 August 2014 - 05:46 AM
I've been playing around with string.char in CC a lot recently, and have noticed that every byte above 126 is unassigned, as well as many bytes under 32. As ComputerCraft follows ASCII, the bytes under 32 being unassigned makes sense, as they are the "unprintable" characters. But everything higher than 126 doesn't really make sense.
In my opinion, we should assign these higher values for our own good. Yes, I realize we can't give them actual appearances, but we could give them a meaning to our programs. For example, a byte could be assigned to mean "ping," so in a Rednet command, when this byte is sent, any server it is sent to should reply back with another byte, likely the one directly above it, which could be named "pong."
I'd like to know your guys' opinions on the subject.
In my opinion, we should assign these higher values for our own good. Yes, I realize we can't give them actual appearances, but we could give them a meaning to our programs. For example, a byte could be assigned to mean "ping," so in a Rednet command, when this byte is sent, any server it is sent to should reply back with another byte, likely the one directly above it, which could be named "pong."
I'd like to know your guys' opinions on the subject.
Edited on 13 August 2014 - 03:46 AM