Implicit typecast question

General discussion on mikroBasic PRO for ARM.
Post Reply
Author
Message
Alessandro Fulignani
Posts: 101
Joined: 04 Nov 2016 13:09

Implicit typecast question

#1 Post by Alessandro Fulignani » 11 Oct 2019 15:47

Good Afternoon,

Sometimes when i have to do some conversions, i get the messages:

101 1509 Warning: Implicit typecast performed from "longword" to "double"
103 1509 Warning: Implicit typecast performed from "float" to "uint64"

Is the somethnig that i should avoid?
Is that something that could lead to any potential issue?

Thank you,

Alex

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: Implicit typecast question

#2 Post by jovana.medakovic » 17 Oct 2019 11:22

Hello,

It happens because when operands are of different types, implicit conversion promotes the less complex type to more complex type.

I recommend you to read Types Conversions in our help file from the compiler.

Kind regards,
Jovana

Alessandro Fulignani
Posts: 101
Joined: 04 Nov 2016 13:09

Re: Implicit typecast question

#3 Post by Alessandro Fulignani » 17 Oct 2019 15:26

Hi Jovana,

Yes!

Thank you,

Alex

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: Implicit typecast question

#4 Post by jovana.medakovic » 18 Oct 2019 11:02

Hi,

You're welcome.

Kind regards,
Jovana

Post Reply

Return to “mikroBasic PRO for ARM General”