KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to debug the error "Argument Types Are Incompatible"
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: January 3, 2003
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

WIN XP
MAC OS X
Compatibility: Version 6.7.x and 6.8.x

The following method should produce this error. This error means that you are trying to assign a value to a variable whose type is incompatible with that value. The error occurs on "$myString:=$myReal". The "TRACE" command should bring up the debugger. Place your mouse cursor on top of each variable for a few seconds. 4D will tell you the variable type and value.

C_STRING(20;$myString)
C_REAL($myReal)

$myString:="STRING_VARIABLE"
$myReal:=5

TRACE
$myString:=$myReal
`wrong; STRING variable cannot accept type REAL

$myString:=STRING($myReal)
`Correct; type REAL has been converted to STRING
`using the STRING command