On Sun, 14 May 2017, alexchernoff wrote: > Good day all, > > Anyone know how to read data received on serial port into an array of bytes > instead of string? >
I think that's not possible. > String gets unreadable binary characters, so how can I > put them into byte[] or so? > This shouldn't be a problem. Gambas Strings are not null-terminated and can contain any sequence of bytes, which includes non-printable characters (which I think is what you meant by "unreadable" characters). If you insist on a Byte[], read it into a String and use Byte[].FromString(), but there is no way to go around the String, AFAICT (and that is because there is no need to, as Strings can handle binary data just fine). Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user