I have used the following code to determine the type of each tag in my eWON:
FOR i% = 0 TO NB% - 1
SETSYS Tag, "load",-i%
name$= GETSYS TAG,"Name"
PRINT GETSYS TAG,"Type"
NEXT i%
Using that code I can see in the console the number associated with each type, e.g. 1 = Float, 0 = boolean, 6 = string.
However, when I use this code I receive a syntax error message:
FOR i% = 0 TO NB% - 1
SETSYS Tag, "load",-i%
name$= GETSYS TAG,"Name"
type% = GETSYS TAG,"Type"
PRINT type%
NEXT i%
The following code produces a different error, mixed string&num operation … IF GETSYS TAG,“Type” = 6 THEN PRINT “STRING”:
FOR i% = 0 TO NB% - 1
SETSYS Tag, "load",-i%
name$= GETSYS TAG,"Name"
IF GETSYS TAG,"Type" = 6 THEN PRINT "STRING"
NEXT i%
Is there a way to retrieve the tag type number and use it somehow in the code, such as assigning it to a variable? What am I missing?