Preprocessor directive
Posted: 23 August 2008, 15:11 PM
I want to use Option.TargetDevice in a preprocessor directive.
e.g. #If (Left(Option.TargetDevice,4) = "ZX24")
Since the pin assignments (like the LEDs) are the same within the ZX24 family, I do not need to know if it is an -A, -AE, -N, etc. (at least I think all the pin assignments are the same withing the family)
I get successful compilation if I do not use the Left() function and just check the entire Option.TargetDevice string, but I want to simplify by using the Left() function. Is there some way to extract the first 4 characters in the preprocessor directive?
-Tony
e.g. #If (Left(Option.TargetDevice,4) = "ZX24")
Since the pin assignments (like the LEDs) are the same within the ZX24 family, I do not need to know if it is an -A, -AE, -N, etc. (at least I think all the pin assignments are the same withing the family)
I get successful compilation if I do not use the Left() function and just check the entire Option.TargetDevice string, but I want to simplify by using the Left() function. Is there some way to extract the first 4 characters in the preprocessor directive?
-Tony