Siam Active Member Licensed User Longtime User Jan 15, 2019 #1 hello, how can i convert an uint to uint8_t or uint16_t in b4r ? i have the following command: B4X: getchar (c as uint8_t, size as uint_8t , buff as uint8_t) as uint8_t this funktion i will call B4X: uint8_t getChar(uint8_t c, uint8_t size, uint8_t *buf); this is in my .h file B4X: uint8_t getChar(uint8_t c, uint8_t size, uint8_t *buf); this is my .cpp file B4X: uint8_t B4RMDMAX72xxLedMatrix::getChar(uint8_t c, uint8_t size, uint8_t *buf){ return led->getChar(c, size, *buf); } how can i call this command ? regards Andy Last edited: Jan 15, 2019
hello, how can i convert an uint to uint8_t or uint16_t in b4r ? i have the following command: B4X: getchar (c as uint8_t, size as uint_8t , buff as uint8_t) as uint8_t this funktion i will call B4X: uint8_t getChar(uint8_t c, uint8_t size, uint8_t *buf); this is in my .h file B4X: uint8_t getChar(uint8_t c, uint8_t size, uint8_t *buf); this is my .cpp file B4X: uint8_t B4RMDMAX72xxLedMatrix::getChar(uint8_t c, uint8_t size, uint8_t *buf){ return led->getChar(c, size, *buf); } how can i call this command ? regards Andy
Erel B4X founder Staff member Licensed User Longtime User Jan 15, 2019 #2 uint8_t is the same as Byte. uint16_t is the same as UInt. Upvote 0
Siam Active Member Licensed User Longtime User Jan 15, 2019 #3 then i make something wrong B4X: Cannot cast type: {Type=Byte,Rank=0, RemoteObject=True} to: {Type=uint8_t,Rank=0, RemoteObject=True} Upvote 0
then i make something wrong B4X: Cannot cast type: {Type=Byte,Rank=0, RemoteObject=True} to: {Type=uint8_t,Rank=0, RemoteObject=True}
Siam Active Member Licensed User Longtime User Jan 15, 2019 #4 ok sometimes i should take a break ... now i have it thx Upvote 0