saunwin Active Member Licensed User Longtime User Sep 24, 2015 #1 Hi Guys and Gurus, Noobie question. I only want to send 2 numbers out of my serial port. This won't compile (missing bracket ? cannot cast type ?) Dim b() As Int b = (129,0) astream.Write(b) Thanks in advance.
Hi Guys and Gurus, Noobie question. I only want to send 2 numbers out of my serial port. This won't compile (missing bracket ? cannot cast type ?) Dim b() As Int b = (129,0) astream.Write(b) Thanks in advance.
R Roycefer Well-Known Member Licensed User Longtime User Sep 24, 2015 #2 I think what you're looking for is this: B4X: Dim b() as Int = Array as Int(129,0) Upvote 0
saunwin Active Member Licensed User Longtime User Sep 24, 2015 #3 Thanks Roycefer -It still won't compile ;( B4J version: 3.61 Parsing code. (0.00s) Compiling code. Error Error compiling program. Error description: Cannot cast type: {Type=Int,Rank=1, RemoteObject=True} to: {Type=Byte,Rank=1, RemoteObject=True} Occurred on line: 155 astream.Write(b) Word: b Upvote 0
Thanks Roycefer -It still won't compile ;( B4J version: 3.61 Parsing code. (0.00s) Compiling code. Error Error compiling program. Error description: Cannot cast type: {Type=Int,Rank=1, RemoteObject=True} to: {Type=Byte,Rank=1, RemoteObject=True} Occurred on line: 155 astream.Write(b) Word: b
saunwin Active Member Licensed User Longtime User Sep 24, 2015 #4 Roycefer - I think I've cracked it. The Int's should be Byte's. Thanks for the pointer Upvote 0