Internet PLC Forum

General => Technical support => Topic started by: NSPA on June 30, 2006, 07:32:47 AM

Title: Program Errors
Post by: NSPA on June 30, 2006, 07:32:47 AM
I am having problems with custom functions. I can write a function and then compile it and it will be fine. I can then compile it again and it will throw a TYPE MISMATCH error. The way that I have it written works. What is the deal? Software or me?

The following is the line that i get the error on. The   A$   is what the program highlights as the error.

HSCDEF 1,11,A$

Error:  Type Mismatch (numerics/strings may not mix)

If this is "wrong" why will it work sometimes but not others?
Title: Re:Program Errors
Post by: support on June 30, 2006, 12:22:36 PM
HSCDEF only takes numeric parameters. A$ is a string variable. You must convert it into numeric term. You can use the VAL or HEXVAL function to do the conversion.