Checking tag type

I am trying to determine the tag type using the following commend (preceded by a SETSYS TAG, “load”,id instruction):

PRINT GETSYS TAG,"Type"

The above command seems to produce an integer relating to the tag type. I have noted a string is tag type 6.

When I try the following command I receive an error:

IF GETSYS TAG,"Type" = 6 THEN PRINT "STRING"

The error is “mixed string&number operation…”

I expect the result of the instruction GETSYS TAG,“Type” is an integer so the error of mixed string and number seems confusing.

try something like this, it looks like it’s taking the value of 6 as a string. but if you do VAL of 6 then it seems to go through

Onchange “test”,"@tagcheck()"

Function Tagcheck()
SETSYS TAG, “Load”, “Test”
PRINT GETSYS TAG,“Type”
A$ = Getsys Tag,“Type”
Print A$

if VAL A$ = 6 Then
print “string”
Endif

Endfn

Thanks…I created a second topic this morning thinking I failed to create one last night. Here’s the link to that topic and how I solved it:

TOPIC: Check tag type

Ok that seems to work as well, thanks for the update!