P pecket Member Jul 15, 2017 #1 I would be so thankful if someone could demonstrate some variable/string handling. I'm having problems understanding the documentation when there are no actual examples there. For example: Reading a single (or multiple) byte(s) from a byte array, using it in an If- or Select-statement. Converting between types correctly. When you need to use rRandomAccessFile and so on. Binary comparison om single or multiple bytes in an array, string, numeric variable and stuff like that. I tried to use the rRf24 library to communicate between a few Arduinos, but I keep messing up the string handling/conversions. Simple examples covering other stuff, such as operators, Core functions etc would also be great. Since the footprint of B4R is a bit on the heavy side I prefer using less conversions etc when I can. Best regards, Peter
I would be so thankful if someone could demonstrate some variable/string handling. I'm having problems understanding the documentation when there are no actual examples there. For example: Reading a single (or multiple) byte(s) from a byte array, using it in an If- or Select-statement. Converting between types correctly. When you need to use rRandomAccessFile and so on. Binary comparison om single or multiple bytes in an array, string, numeric variable and stuff like that. I tried to use the rRf24 library to communicate between a few Arduinos, but I keep messing up the string handling/conversions. Simple examples covering other stuff, such as operators, Core functions etc would also be great. Since the footprint of B4R is a bit on the heavy side I prefer using less conversions etc when I can. Best regards, Peter
Erel B4X founder Staff member Licensed User Longtime User Jul 16, 2017 #2 See these tutorials: Memory, Variables and Objects Strings and Bytes Avoid using strings whenever possible. Use B4RSerializator to convert numbers and other types to an array of bytes: [B4X] B4RSerializator - Send and receive objects instead of bytes Upvote 0
See these tutorials: Memory, Variables and Objects Strings and Bytes Avoid using strings whenever possible. Use B4RSerializator to convert numbers and other types to an array of bytes: [B4X] B4RSerializator - Send and receive objects instead of bytes
P pecket Member Jul 20, 2017 #3 I'll post my current project in the forum and ask for help. I can't seem to grasp how to properly convert between different types of variables, no matter how much I try. It just doesn't make sense to me. Upvote 0
I'll post my current project in the forum and ask for help. I can't seem to grasp how to properly convert between different types of variables, no matter how much I try. It just doesn't make sense to me.