fbpx

Compiler Error XS0246

  • Karl-Heinz Rauscher
  • Karl-Heinz Rauscher's Avatar Topic Author
  • Offline
More
6 months 1 week ago #1 by Karl-Heinz Rauscher
Compiler Error XS0246 was created by Karl-Heinz Rauscher
The line:

iDiff := Integer ( ( ( iCurrentHeight ) - ( struTemp.bottom - struTemp.top ) ) / 2 )

causes the error XS0246 "The type or namespace 'iCurrentheight' could not be found" etc. The error is gone when i remove the iCurrenheight parentheses.

iDiff := Integer ( ( iCurrentHeight - ( struTemp.bottom - struTemp.top ) ) / 2 )

but why does throw the first line an XS0246 error ?

regards
Karl-Heinz

Please Log in or Create an account to join the conversation.

More
6 months 1 week ago #2 by Robert van der Hulst
Replied by Robert van der Hulst on topic Compiler Error XS0246
Karl Heinz,

I think the compiler is confused and thinks that you are casting the value - ( struTemp.bottom - struTemp.top ) to the type iCurrentHeight.

In VO that could not happen because it does not know the
(<TypeName>) <Expression>

cast.

Robert

XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.